all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Rolf Ade <rolf@pointsman.de>, 31650@debbugs.gnu.org
Subject: bug#31650: 26.1; Desktop mode adds wm stickiness to emacs windows.
Date: Wed, 30 May 2018 08:40:56 +0200	[thread overview]
Message-ID: <5B0E4778.9030708@gmx.at> (raw)
In-Reply-To: <87zi0idk0c.fsf@pointsman.de>

 > I've
 >
 > (desktop-save-mode 1)
 >
 > in my init.el. This works fine for rare occasions is restart emacs.
 > Though, after restart, I not only find all my files open but the eamcs
 > window "sticky" speaking in windows manager terms, meaning if I jump to
 > another virtual desktop, my emacs windwos will "follow" me.

We would eventually have to find out whether and how an Emacs frame
can get "spontaneously" sticky in a session that has not been polluted
from a saved desktop.  I'd suggest to proceed as follows: Somewhere
near the end of your init file (that is, after the code that restores
the previous desktop) insert this code:

(let (sticky-frames)
   (dolist (frame (frame-list))
     (when (frame-parameter frame 'sticky)
       (setq sticky-frames (cons frame sticky-frames)))
     (set-frame-parameter frame 'sticky nil))

   (when sticky-frames
     (message "The following frames were found sticky: %s" sticky-frames)))

Now this should (1) make all your frames non-sticky in the new session
and (2) tell you if some frames were stored as sticky in your last
session.  If (2) happens frequently and you are sure that you have
never marked any frames as sticky, we could execute that code above
with an idle timer and so get an approximate indication of _when_ a
frame changes its stickyness spontaneously.

 > The emacs window wasn't in this state at the last
 > save-buffers-kill-terminal call.

How can you be sure of that?  The code for saving the desktop is dumb
and handles stickyness like any other frame parameter it does not
treat specially.  So it would surprise me if the desktop saving code
deliberately remembered a frame as sticky.

 > It doesn't have this state if I start
 > emacs -Q. It's  desktop-save-mode, that put my emacs window into this
 > state.
 >
 > It's a minor nuisance, no doubt, but it's clearly wrong.
 >
 > I'm using GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 >   2.24.10) of 2018-05-29 built on linux-qg7d Repository revision:
 >   07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea Windowing system distributor
 >   'The X.Org Foundation', version 11.0.11203000 (x86_64) and as windows
 >   manager fvwm 2.6.

martin





  reply	other threads:[~2018-05-30  6:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-30  1:12 bug#31650: 26.1; Desktop mode adds wm stickiness to emacs windows Rolf Ade
2018-05-30  6:40 ` martin rudalics [this message]
2018-05-30 10:53   ` Rolf Ade
2018-05-30 12:37     ` martin rudalics
2018-05-30 14:49       ` Rolf Ade
2018-05-31  7:28         ` martin rudalics
2018-05-31 13:00           ` Rolf Ade
2018-05-31 13:55             ` martin rudalics
2018-05-31 14:05               ` Robert Pluim
2018-05-31 16:02                 ` Robert Pluim
2018-06-01  6:09                   ` martin rudalics
2018-06-01  6:41                     ` Robert Pluim
2018-06-02  9:12                       ` martin rudalics
2018-06-04  9:14                         ` Robert Pluim
2018-05-31 22:58               ` Noam Postavsky
2018-06-01  6:09                 ` martin rudalics
2018-06-01 10:47             ` Rolf Ade
2018-06-02  9:13               ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5B0E4778.9030708@gmx.at \
    --to=rudalics@gmx.at \
    --cc=31650@debbugs.gnu.org \
    --cc=rolf@pointsman.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.