unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Rolf Ade <rolf@pointsman.de>
Cc: 31650@debbugs.gnu.org
Subject: bug#31650: 26.1; Desktop mode adds wm stickiness to emacs windows.
Date: Thu, 31 May 2018 15:55:42 +0200	[thread overview]
Message-ID: <5B0FFEDE.2090309@gmx.at> (raw)
In-Reply-To: <87po1cdlom.fsf@pointsman.de>

 > - It's not about desktop-mode, it's about set-frame-parameter, which
 >    doesn't seem to work correctly at least with some windows managers.

If worse comes to worst we can avoid setting the parameter when the
stored value alreay equals the requested value by writing something
like:

void
x_set_sticky (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
{
   Lisp_Object frame;
   struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);

   if (!EQ (new_value, old_value))
     {
       XSETFRAME (frame, f);

       set_wm_state (frame, !NILP (new_value),
		    dpyinfo->Xatom_net_wm_state_sticky, None);
     }
}

This might be even the right thing to do if, for example, the WM
decides that making a non-sticky frame non-sticky is a silly request
and the application probably wants a sticky frame instead.

 > - Seems to be windows manager specific (you don't see it with xfwm4, I
 >    do with fvwm2 2.6.4).

We would have to hear from others.  Anyone?  With emacs -Q evaluate

(set-frame-parameter nil 'sticky nil)

and look whether your frame starts to appear on all your desktops.

 > I'll try to build fvwm2 2.6.7 (which seems to be the latest) and check
 > if it shows the same (mis-)behaviour. Though, that has to wait for
 > tomorrow.
 >
 > If there is anything else I could to do help analyzing the problem just
 > let me know.

You have done a lot already.  But there are two things that might be
interesting to get the full picture: Put a brakpoint in xterm.c in
get_current_wm_state at the line

       else if (a == dpyinfo->Xatom_net_wm_state_sticky)

and look what value gets assigned here after you set stickyness on/off
via the window manager or via ‘set-frame-parameter’ - that means four
cases to check.

The second is to not use USE_XCB (_if you do_) by simply replacing
USE_XCB by 0 (zero) in all occurrences of this symbol in
get_current_wm_state - only if you can recompile, obviously.

I expect both of these not to change a thing in the actual behavior
since these are just the values reported to us by the WM but I'd like
to be sure that the WM behaves consistently in this regard.

And you could try to build Emacs without toolkit support (Lucid or
Motif would be better but may require to download some development
libraries) and look whether the problem persists.  Then we would know
that the problem is or is not toolkit dependent, where the former
would consitute a step forward.

Many thanks, martin






  reply	other threads:[~2018-05-31 13:55 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
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 [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=5B0FFEDE.2090309@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).