From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#19413: 24.4; (desktop-save-mode 1) save frame as page and desktop sticky (_NET_WM_STATE_STICKY) when close Emacs shaded, (setq desktop-restore-frames nil) fix issue. Date: Sat, 20 Dec 2014 15:50:14 +0100 Message-ID: <54958CA6.9020201@gmx.at> References: <87h9wrqpmt.fsf@gavenkoa.example.com> <54954B26.2000200@gmx.at> <87oaqy5wlv.fsf@gavenkoa.example.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1419087090 2073 80.91.229.3 (20 Dec 2014 14:51:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Dec 2014 14:51:30 +0000 (UTC) Cc: 19413@debbugs.gnu.org To: Oleksandr Gavenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 20 15:51:22 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y2LNG-0000jn-Cv for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Dec 2014 15:51:18 +0100 Original-Received: from localhost ([::1]:34606 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2LNF-00009H-NA for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Dec 2014 09:51:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2LN6-0008R5-7T for bug-gnu-emacs@gnu.org; Sat, 20 Dec 2014 09:51:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y2LN0-0004zb-FA for bug-gnu-emacs@gnu.org; Sat, 20 Dec 2014 09:51:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2LN0-0004zX-Az for bug-gnu-emacs@gnu.org; Sat, 20 Dec 2014 09:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y2LN0-0007x5-4m for bug-gnu-emacs@gnu.org; Sat, 20 Dec 2014 09:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Dec 2014 14:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19413 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19413-submit@debbugs.gnu.org id=B19413.141908703630533 (code B ref 19413); Sat, 20 Dec 2014 14:51:02 +0000 Original-Received: (at 19413) by debbugs.gnu.org; 20 Dec 2014 14:50:36 +0000 Original-Received: from localhost ([127.0.0.1]:52252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2LMZ-0007wO-T3 for submit@debbugs.gnu.org; Sat, 20 Dec 2014 09:50:36 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:52259) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2LMW-0007wF-Q7 for 19413@debbugs.gnu.org; Sat, 20 Dec 2014 09:50:34 -0500 Original-Received: from [188.23.121.89] ([188.23.121.89]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MGSgq-1Y6nKK3Xqi-00DGo2; Sat, 20 Dec 2014 15:50:25 +0100 In-Reply-To: <87oaqy5wlv.fsf@gavenkoa.example.com> X-Provags-ID: V03:K0:upmeXXkBcLNvgtWLG3iPF+ADRKvwQlrKUMlj2Zb2M7VB2mdK9kU cHHKSxbhhvTZKX59KTVIqnt/HeWZkA66W+ScpM/xjI+1alpTcV/GjhU+IS4xMxwaF5bcdlj uPKo7cNVEit6YucTCupWEKWQydlGodzt4yo675fwXCPDHqEpfyGQH67pGjEL7iq74GhiDgC Hi3k9TocmITXUFFzEzHiw== X-UI-Out-Filterresults: notjunk:1; X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:97608 Archived-At: > When frame sticky (Fvwm decorate it especially) I get "t". For non-sticky I > get "nil". So the value of sticky corresponds to what you see on screen. Correct? > I always get normally started Emacs unless I shaded Emacs window. When I close > shaded Emacs ~/.emacs.desktop changed to: > > (setq desktop-saved-frameset [frameset 1 (21653 24375 351017 568000) (desktop . "206") "user@desktop.home.int" nil nil ((((font-backend xft x) (font . "-Misc-Fixed-normal-normal-normal-*-14-*-*-*-c-70-iso10646-1") (font-parameter . "-misc-fixed-medium-r-normal-*-14-*-*-*-c-*-iso10646-1") (border-width . 0) (internal-border-width . 0) (right-divider-width . 0) (bottom-divider-width . 0) (vertical-scroll-bars . right) (foreground-color . "black") (background-color . "white") (mouse-color . "black") (border-color . "black") (screen-gamma) (line-spacing) (left-fringe . 10) (right-fringe . 11) (scroll-bar-foreground) (scroll-bar-background . "grey75") (menu-bar-lines . 1) (tool-bar-lines . 1) (title) (wait-for-wm . t) (fullscreen) (tool-bar-position . top) (icon-type . t) (auto-raise) (auto- lower) (cursor-type . box) (scroll-bar-width . 16) (alpha) (horizontal-scroll-bars . t) (display-type . color) (background-mode . light) (cursor-color . "black") (environment) (frameset--id . "A948 -AB72-D73D-287C") (frameset--mini t . t) (modeline . t) (minibuffer . t) (unsplittable) (icon-name) (visibility . t) (display . ":0") (explicit-name) (sticky) (height . 35) (width . 80) (left . 1240) (top . 28)) ((min-height . 8) (min-width . 10) (min-height-ignore . 4) (min-width-ignore . 8) (min-height-safe . 2) (min-width-safe . 2) (min-pixel-height . 112) (min-pixel-width . 70) (min-pixel-height-ignore . 56) (min-pixel-width-ignore . 56) (min-pixel-height-safe . 28) (min-pixel-width-safe . 14)) vc (pixel-width . 597) (pixel-height . 476) (total-width . 85) (total-height . 34) (normal-height . 1.0) (normal-width . 1.0) (combination-limit) (leaf (pixel-width . 597) (pixel-height . 238) (total-width . 85) (total-height . 17) (normal-height . 0.5) (normal-width . 1.0) (buffer "mc.ext" (selected) (hscroll . 0) (fringes 10 11 nil) (margins nil) (scroll-bars 16 3 t nil) (vscroll . 0) (dedicated) (point . 5457) (start . 5293))) (leaf (last . t) (pixel-width . 597) (pixel-height . 238) (total-width . 85) (total-height . 17) (normal-height . 0.5) (normal-width . 1.0) (buffer "*Messages*" (selected . t) (hscroll . 0) (fringes 10 11 nil) (margins nil) (scroll-bars 16 3 t nil) (vscroll . 0) (dedicated) (point . 284) (start . 1)))))]) > > You can see difference in "(sticky)" above. New "emacs --no-site-file" opened > as sticky and when I close Emacs ~/.emacs.desktop changed to: > > (setq desktop-saved-frameset [frameset 1 (21653 24557 165658 111000) (desktop . "206") "user@desktop.home.int" nil nil ((((font-backend xft x) (font . "-Misc-Fixed-normal-normal-normal-*-14-*-*-*-c-70-iso10646-1") (font-parameter . "-misc-fixed-medium-r-normal-*-14-*-*-*-c-*-iso10646-1") (border-width . 0) (internal-border-width . 0) (right-divider-width . 0) (bottom-divider-width . 0) (vertical-scroll-bars . right) (foreground-color . "black") (background-color . "white") (mouse-color . "black") (border-color . "black") (screen-gamma) (line-spacing) (left-fringe . 10) (right-fringe . 11) (scroll-bar-foreground) (scroll-bar-background . "grey75") (menu-bar-lines . 1) (tool-bar-lines . 1) (title) (wait-for-wm . t) (fullscreen) (tool-bar-position . top) (icon-type . t) (auto-raise) (auto- lower) (cursor-type . box) (scroll-bar-width . 16) (alpha) (horizontal-scroll-bars . t) (display-type . color) (background-mode . light) (cursor-color . "black") (environment) (frameset--id . "A948 -AB72-D73D-287C") (frameset--mini t . t) (modeline . t) (minibuffer . t) (unsplittable) (icon-name) (visibility . t) (display . ":0") (explicit-name) (sticky . t) (height . 35) (width . 80) (left . 1240) (top . 28)) ((min-height . 8) (min-width . 10) (min-height-ignore . 4) (min-width-ignore . 8) (min-height-safe . 2) (min-width-safe . 2) (min-pixel-height . 112) (min-pixel-width . 70) (min-pixel-height-ignore . 56) (min-pixel-width-ignore . 56) (min-pixel-height-safe . 28) (min-pixel-width-safe . 14)) vc (pixel-width . 597) (pixel-height . 476) (total-width . 85) (total-height . 34) (normal-height . 1.0) (normal-width . 1.0) (combination-limit) (leaf (pixel-width . 597) (pixel-height . 238) (total-width . 85) (total-height . 17) (normal-height . 0.5) (normal-width . 1.0) (buffer "mc.ext" (selected) (hscroll . 0) (fringes 10 11 nil) (margins nil) (scroll-bars 16 3 t nil) (vscroll . 0) (dedicated) (point . 5457) (start . 5293))) (leaf (last . t) (pixel-width . 597) (pixel-height . 238) (total-width . 85) (total-height . 17) (normal-height . 0.5) (normal-width . 1.0) (buffer "*Messages*" (selected . t) (hscroll . 0) (fringes 10 11 nil) (margins nil) (scroll-bars 16 3 t nil) (vscroll . 0) (dedicated) (point . 284) (start . 1)))))]) > > You can see difference in "(sticky . t)" above. Next rerun leave > ~/.emacs.desktop without changes. To get it right: You first close Emacs with a shaded frame and if you afterwards look at the desktop file it has (sticky) in it. If you now restart Emacs and close it again, the desktop file has (sticky . t). > So there are two problems: > > 1) Emacs instead saving shaded window attribute add "(sticky)" to ~/.emacs.desktop So if you do not have a desktop file initially but enable `desktop-save-mode' and then (1) close Emacs with a shaded frame, and (2) close Emacs with an unshaded frame the difference is a (sticky) entry for (1) and no such entry for (2). Is that correct? > 2) (desktop-read) wrongly apply (sticky), and (sticky . t) and (sticky . nil) > - as always sticky. This sounds like a reasonable explanation. x_net_wm_state has /** store_frame_param (f, Qsticky, sticky ? Qt : Qnil); **/ without any further comment, maybe it's related. Does Emacs process (set-frame-parameter nil 'sticky ...) correctly on your system without desktop saving involved? > I check /src/xterm.h: > > /* Atoms dealing with EWMH (i.e. _NET_...) */ > Atom Xatom_net_wm_state, Xatom_net_wm_state_fullscreen, > Xatom_net_wm_state_maximized_horz, Xatom_net_wm_state_maximized_vert, > Xatom_net_wm_state_sticky, Xatom_net_wm_state_hidden, > Xatom_net_frame_extents, > Xatom_net_current_desktop, Xatom_net_workarea; > > There are no _NET_WM_STATE_SHADED that defined in: > > http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html#idm140130317598336 > _NET_WM_STATE > > which say: > > Possible atoms are: > > _NET_WM_STATE_MODAL, ATOM > _NET_WM_STATE_STICKY, ATOM > _NET_WM_STATE_MAXIMIZED_VERT, ATOM > _NET_WM_STATE_MAXIMIZED_HORZ, ATOM > _NET_WM_STATE_SHADED, ATOM > _NET_WM_STATE_SKIP_TASKBAR, ATOM > _NET_WM_STATE_SKIP_PAGER, ATOM > _NET_WM_STATE_HIDDEN, ATOM > _NET_WM_STATE_FULLSCREEN, ATOM > _NET_WM_STATE_ABOVE, ATOM > _NET_WM_STATE_BELOW, ATOM > _NET_WM_STATE_DEMANDS_ATTENTION, ATOM We have to possibilities to deal with these: Either we wait for Jan to return from his voyage or you fix these issues yourself. Given your findings above I'm quite confident that you could do it. martin