From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleksandr Gavenko 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 19:33:40 +0200 Organization: Oleksandr Gavenko , http://gavenkoa.users.sf.net Message-ID: <87k31m5iq3.fsf@gavenkoa.example.com> References: <87h9wrqpmt.fsf@gavenkoa.example.com> <54954B26.2000200@gmx.at> <87oaqy5wlv.fsf@gavenkoa.example.com> <54958CA6.9020201@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1419096866 15381 80.91.229.3 (20 Dec 2014 17:34:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Dec 2014 17:34:26 +0000 (UTC) Cc: 19413@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 20 18:34:20 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 1Y2Nuz-0003m9-Nk for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Dec 2014 18:34:17 +0100 Original-Received: from localhost ([::1]:35369 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2Nuy-0006Rq-SN for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Dec 2014 12:34:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2Nuq-0006Rg-Ay for bug-gnu-emacs@gnu.org; Sat, 20 Dec 2014 12:34:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y2Nuk-0004G5-85 for bug-gnu-emacs@gnu.org; Sat, 20 Dec 2014 12:34:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2Nuk-0004Fz-2n for bug-gnu-emacs@gnu.org; Sat, 20 Dec 2014 12:34:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y2Nuj-0003zG-Sz for bug-gnu-emacs@gnu.org; Sat, 20 Dec 2014 12:34:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Oleksandr Gavenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Dec 2014 17:34:01 +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.141909682715304 (code B ref 19413); Sat, 20 Dec 2014 17:34:01 +0000 Original-Received: (at 19413) by debbugs.gnu.org; 20 Dec 2014 17:33:47 +0000 Original-Received: from localhost ([127.0.0.1]:53252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2NuT-0003yl-Ug for submit@debbugs.gnu.org; Sat, 20 Dec 2014 12:33:46 -0500 Original-Received: from mail-la0-f46.google.com ([209.85.215.46]:61792) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2NuR-0003yb-J3 for 19413@debbugs.gnu.org; Sat, 20 Dec 2014 12:33:44 -0500 Original-Received: by mail-la0-f46.google.com with SMTP id q1so2324154lam.19 for <19413@debbugs.gnu.org>; Sat, 20 Dec 2014 09:33:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version:content-type :content-transfer-encoding; bh=L1ytK03eptn9zpiHccbuFEkZ3DWw5lJb2pRdu2ml2tI=; b=OqkMsuw9Sbqa0rXPyV+uj+FJ/Qb0eMdK4Kr7DdBzkQs0bdy9V3sfJBArpAqiqa2y3w Zb3Kvg/qiCh9j0nw9GNXGTj5aSTRtXoYW6jv3Wu/hvzmyO2YFocZud77vR7hv2Ulq56X HDz/9zcImMFYSBLmLHChoVbYBaNhbby4o4bzG4OTt3FqndXNyKdWpvvXc8f5DMbyyP9D 2Cb3vDXDY1H4CXdLODuQEkWORhJTuTiveC3tf484W4hTiLNeWmpFKgvlk9lt62D1Qs7O Hurfo4cLTHPgyb9exXNZqAPrwNYnIOuAz6Q6M1pOG738c1yxkNJhmEX62jQXN1TNOL6j a9cg== X-Received: by 10.152.234.35 with SMTP id ub3mr13728366lac.70.1419096822657; Sat, 20 Dec 2014 09:33:42 -0800 (PST) Original-Received: from desktop.home.int ([46.211.79.104]) by mx.google.com with ESMTPSA id uj5sm3691286lbc.16.2014.12.20.09.33.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Dec 2014 09:33:41 -0800 (PST) In-Reply-To: <54958CA6.9020201@gmx.at> (martin rudalics's message of "Sat, 20 Dec 2014 15:50:14 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) 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:97623 Archived-At: On 2014-12-20, martin rudalics wrote: >> When frame sticky (Fvwm decorate it especially) I get "t". For non-stick= y I >> get "nil". > > So the value of sticky corresponds to what you see on screen. Correct? Yes. > 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). Yes. >> So there are two problems: >> >> 1) Emacs instead saving shaded window attribute add "(sticky)" to ~/.e= macs.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? Yes. >> 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? Any of: (set-frame-parameter nil 'sticky t) (set-frame-parameter nil 'sticky nil) (set-frame-parameter nil 'sticky 1) (set-frame-parameter nil 'sticky -1) make clean "emacs -Q" sticky. Seems that issue here. It is possible Fvwm bug but I don't know how to distinct. In FvwmConsole I run: WindowId 0x2400013 Stick false WindowId 0x2400013 Stick true and Emacs window change stickness exactly to command. >> 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_ver= t, >> 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#idm14013031= 7598336 >> _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. xterm.c and elisp frame handling code are complicate to me. I just can summarise investigation:=20 * (set-frame-parameter nil 'sticky ...) doesn't work, it always set _NET_WM_STATE(ATOM) to _NET_WM_STATE_STICKY regardless passed value. * Emacs code base know nothing about _NET_WM_STATE_SHADED value of _NET_WM_STATE(ATOM). * There are no "shaded" (info "(elisp)Window Frame Parameters"). I see: =E2=80=98sticky=E2=80=99, =E2=80=98visibility=E2=80=99, =E2=80=98fullscr= een=E2=80=99 (maximized, fullboth, fullwidth, fullheight). * Closing shaded Emacs with "(desktop-save-mode 1)" add (stick) parameter = to ~/.emacs.desktop --=20 Best regards!