After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 786363 - _NET_RESTACK_WINDOW call does nothing
_NET_RESTACK_WINDOW call does nothing
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2017-08-16 11:56 UTC by Martin Schreiber
Modified: 2017-09-29 16:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test program (2.12 KB, text/x-csrc)
2017-08-16 11:56 UTC, Martin Schreiber
  Details
Implement _NET_RESTACK_WINDOW and sibling-relative stacking (2.45 KB, patch)
2017-08-18 13:49 UTC, Vasilis Liaskovitis
none Details | Review
x11/window: Implement _NET_RESTACK_WINDOW (2.48 KB, patch)
2017-08-18 15:33 UTC, Vasilis Liaskovitis
none Details | Review
x11/window: Respect XConfigureRequestEvent sibling (2.60 KB, patch)
2017-08-28 12:51 UTC, Vasilis Liaskovitis
none Details | Review
x11/window: Implement _NET_RESTACK_WINDOW and XConfigureRequestEvent sibling (6.38 KB, patch)
2017-09-28 16:11 UTC, Vasilis Liaskovitis
committed Details | Review

Description Martin Schreiber 2017-08-16 11:56:28 UTC
Created attachment 357715 [details]
Test program

While adapting MSEide+MSEgui
https://sourceforge.net/projects/mseide-msegui/
to Gnome I found on OpenSUSE Leap 42.2 that _NET_RESTACK_WINDOW functionality seems not to be implemented. The Z-order of the windows does not change while running the attached program.
See also
http://bugzilla.suse.com/show_bug.cgi?id=1052058
Comment 1 Vasilis Liaskovitis 2017-08-18 13:49:49 UTC
Created attachment 357898 [details] [review]
Implement _NET_RESTACK_WINDOW and sibling-relative stacking

Based on metacity commit 0b5a50c8

Please review. The original metacity patch implemented a new function meta_window_stack_just_above(), but I think below / above placement can be handled with the existing meta_window_stack_just_below()

In terms of adding a test in src/tests, options are

- Adding the attached program

- adding an old gtk2+ stacking test:
https://svn.code.sf.net/p/view/code/trunk/wm-test-suite/

- I also see some stacking .metatest tests in src/tests/stacking, could these be changed to test __NET_RESTACK_WINDOW?

Let me know which test addition is preferred.
Comment 2 Rui Matos 2017-08-18 14:35:40 UTC
Review of attachment 357898 [details] [review]:

Thanks, the code looks fine.

Can you re-submit with a commit message following the existing convention? just something like:

x11/window: Implement _NET_RESTACK_WINDOW

"sibling-relative stacking" sounds like this implements support XConfigureWindow's sibling argument which isn't the case
Comment 3 Martin Schreiber 2017-08-18 15:23:35 UTC
Does the white window change the Z-order between top and between the black windows with the test program?
Because there is also
https://bugzilla.gnome.org/show_bug.cgi?id=786365
Comment 4 Vasilis Liaskovitis 2017-08-18 15:33:40 UTC
Created attachment 357911 [details] [review]
x11/window: Implement _NET_RESTACK_WINDOW

Update of the patch.

This does not implement XConfigureWindow (I think that is needed for https://bugzilla.gnome.org/show_bug.cgi?id=786365). I will also try to look at that.
Comment 5 Rui Matos 2017-08-18 15:47:44 UTC
Review of attachment 357911 [details] [review]:

looks good
Comment 6 Vasilis Liaskovitis 2017-08-28 12:51:50 UTC
Created attachment 358589 [details] [review]
x11/window: Respect XConfigureRequestEvent sibling

This is for bgo#786365. I am posting here because it should be applied on top of the "x11/window: Implement _NET_RESTACK_WINDOW" patch (comment#5), as it uses a function defined in that patch (restack_window). Please review.

I am not sure if patch of comment#5 has been queued for master. If not, and if this one looks good, I can also spin one final patch for both issues.

Also, if you have suggestions for adding tests (See questions on comment#1) please let me know.
Comment 7 Vasilis Liaskovitis 2017-09-28 16:11:55 UTC
Created attachment 360616 [details] [review]
x11/window: Implement _NET_RESTACK_WINDOW and XConfigureRequestEvent sibling

Updated patch with fix for the second testcase, which posted in bug#786365. Both testcases should work now.

The new function for meta_window_stack_just_above() from original metacity commit was needed after all. Otherwise (with old patch), we always lower windowA to its lower sibling windowB position, even if the original request was to raise windowB to its higher sibling windowA position. 

This patch covers both this bug and bug#786365. Posted to both bugs for completion. Please review.
Comment 8 Rui Matos 2017-09-29 13:15:57 UTC

*** This bug has been marked as a duplicate of bug 786365 ***
Comment 9 Rui Matos 2017-09-29 16:36:21 UTC
Attachment 360616 [details] pushed as e3d5983 - x11/window: Implement _NET_RESTACK_WINDOW and XConfigureRequestEvent sibling