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 774475 - wayland: gtk+ prevents using subsurfaces if the parent is not root
wayland: gtk+ prevents using subsurfaces if the parent is not root
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 774546 774915 774917 775319
 
 
Reported: 2016-11-15 13:48 UTC by Olivier Fourdan
Modified: 2016-11-29 13:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] gdkwindow: Allow native subsurface for all parents (1.14 KB, patch)
2016-11-15 13:53 UTC, Olivier Fourdan
none Details | Review
[PATCH gtk-3-22] gdkwindow: Allow native subsurface for all parents (1.14 KB, patch)
2016-11-15 13:54 UTC, Olivier Fourdan
committed Details | Review
[PATCH master] gdkwindow: Allow native subsurface for all parents (1.10 KB, patch)
2016-11-15 13:55 UTC, Olivier Fourdan
committed Details | Review

Description Olivier Fourdan 2016-11-15 13:48:41 UTC
Description:

Under Wayland, a subsurface would have another surface as parent, but gdk would not allow native windows if the parent is not the root window:

   https://git.gnome.org/browse/gtk+/tree/gdk/gdkwindow.c#n1218

As a result, the subsurface.c example in gtk+ is not actually using a Wayland sursurface, because the parent is not the root window:

   https://git.gnome.org/browse/gtk+/tree/tests/subsurface.c?h=gtk-3-22#n49

Note, the test subsurface.c has been removed from master, but that's unrelated, a program should be able to create a subsurface with a parent and not just the root window.
Comment 1 Olivier Fourdan 2016-11-15 13:53:12 UTC
Created attachment 339935 [details] [review]
[PATCH] gdkwindow: Allow native subsurface for all parents

Patch for master
Comment 2 Olivier Fourdan 2016-11-15 13:54:32 UTC
Created attachment 339936 [details] [review]
[PATCH gtk-3-22] gdkwindow: Allow native subsurface for all parents

Patch for gtk-3-22 branch
Comment 3 Olivier Fourdan 2016-11-15 13:55:46 UTC
Created attachment 339937 [details] [review]
[PATCH master] gdkwindow: Allow native subsurface for all parents

Patch for git master
Comment 4 Matthias Clasen 2016-11-17 11:27:57 UTC
Review of attachment 339937 [details] [review]:

ok
Comment 5 Matthias Clasen 2016-11-17 11:28:06 UTC
Review of attachment 339937 [details] [review]:

ok
Comment 6 Matthias Clasen 2016-11-17 11:28:20 UTC
Review of attachment 339936 [details] [review]:

ok