---------- Forwarded message ----------
From: SourceForge.net <[email protected]>
Date: 2012/8/4
Subject: [ lmuse-Bugs-3554301 ] workaround from 2811156 makes popup
windows unclosable
To: "SourceForge.net" <[email protected]>


Bugs item #3554301, was opened at 2012-08-04 08:57
Message generated for change (Tracker Item Submitted) made by mstapelberg
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=604222&aid=3554301&group_id=93414

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: cvs(HEAD)
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Michael Stapelberg (mstapelberg)
Assigned to: Nobody/Anonymous (nobody)
Summary: workaround from 2811156 makes popup windows unclosable

Initial Comment:
Hi,

a user of http://www.i3wm.org/ brought to my attention that popup
windows opened by MusE (tested with 2.0~rc2) are unclosable in i3.

After investigating the issue,  I came accross lines like these:

      // work around for probable QT/WM interaction bug.
      // for certain window managers, e.g xfce, this window is
      // is displayed although not specifically set to show();
      // bug: 2811156    Softsynth GUI unclosable with XFCE4 (and a few others)
      show();
      hide();

With xtrace, I can see that this code translates to the following X11 requests:

000:<:0a6f:  8: Request(8): MapWindow window=0x0120008e
000:<:0a70:  8: Request(10): UnmapWindow window=0x0120008e
000:>:0a70: Event PropertyNotify(28) window=0x0120008e
atom=0x170("_NET_WM_SYNC_REQUEST_COUNTER") time=0x3f0717c1
state=NewValue(0x00)
000:<:0a71: 44: Request(25): SendEvent propagate=false(0x00)
destination=0x000000be
event-mask=SubstructureNotify,SubstructureRedirect UnmapNotify(18)
event=0x000000be window=0x0120008e from-configure=false(0x00)

That is, the window is mapped and directly unmapped again. This poses
a race condition with reparenting window managers (such as i3, but
also the WMs of GNOME or KDE): X11 will translate the MapWindow to a
MapRequest, which the WM then executes. However, at the time the WM
gets to executing the MapWindow, MusE has already sent the
UnmapWindow. Therefore, what actually happened is not in sync with
what MusE thinks: the window is still visible on the screen, but it
shouldn’t be.

This race condition is also well-documented in this paper:
http://www.std.org/~msm/common/WhyX.pdf (page 13 and 14). It says:
"UnmapWindow requires that the window already be mapped; if a client
calls UnmapWindow before receiving MapNotify, the window may remain
mapped."

I therefore suggest that you change the code in such a way that it
waits until the window is mapped (X11 MapNotify event) before
unmapping it again, or removing the workaround entirely (as did the
user who reported it, and that makes MusE usable in i3) and find a
different way to solve the original problem.

In case you have any questions, feel free to contact me.

Best regards,
Michael

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=604222&aid=3554301&group_id=93414

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Lmuse-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lmuse-developer

Reply via email to