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 745721 - wayland: Add support for gtk_window_set_modal
wayland: Add support for gtk_window_set_modal
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on: 745720
Blocks:
 
 
Reported: 2015-03-06 04:29 UTC by Jonas Ådahl
Modified: 2015-04-23 08:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: Only bind to supported gtk-shell versions (2.69 KB, patch)
2015-03-06 04:29 UTC, Jonas Ådahl
committed Details | Review
wayland: Add support for gtk_window_set_modal (4.30 KB, patch)
2015-03-06 04:29 UTC, Jonas Ådahl
none Details | Review
wayland: Add support for gtk_window_set_modal (4.50 KB, patch)
2015-03-16 02:35 UTC, Jonas Ådahl
none Details | Review
wayland: Move gtk-shell compatibility version define too (1.27 KB, patch)
2015-03-16 12:05 UTC, Jonas Ådahl
committed Details | Review
wayland: Add support for gtk_window_set_modal (4.54 KB, patch)
2015-03-16 12:05 UTC, Jonas Ådahl
committed Details | Review

Description Jonas Ådahl 2015-03-06 04:29:24 UTC
Update the gtk-shell protocol to the one with set/unset_modal and send those requests when the window goes modal. Seems to do work fine when testing with gtk3-demo and mutter with the patches from https://bugzilla.gnome.org/show_bug.cgi?id=745720 applied.

The first patch adds the version check when binding the gtk_shell interface.
Comment 1 Jonas Ådahl 2015-03-06 04:29:30 UTC
Created attachment 298682 [details] [review]
wayland: Only bind to supported gtk-shell versions

The gtk-shell Wayland protocol extension is not meant to be backward
compatible right now, so avoid binding to any version that is not the
one supported.
Comment 2 Jonas Ådahl 2015-03-06 04:29:35 UTC
Created attachment 298683 [details] [review]
wayland: Add support for gtk_window_set_modal

Add two new requests to the gtk_surface interface: set_modal and
unset_modal. The server will currently not do anything special with
input focus, and its up to the client to ignore events on the parent
surface.
Comment 3 Matthias Clasen 2015-03-06 23:30:56 UTC
Review of attachment 298682 [details] [review]:

Since it is very later for 3.16, we should hold this until we branch for 3.16. It will lead to some temporary pain next cycle, when running gtk+ 3.17 apps against a 3.16 shell, but so be it.
Comment 4 Matthias Clasen 2015-03-07 20:02:38 UTC
Review of attachment 298682 [details] [review]:

Actually, this one is fine to land before 3.16
Comment 5 Matthias Clasen 2015-03-07 20:03:30 UTC
Review of attachment 298683 [details] [review]:

Would be good to mention in the commit that it bumps the gtk_surface interface version.

Since it is very late for 3.16, we should hold this until we branch for 3.16. It will lead to some temporary pain next cycle, when running gtk+ 3.17 apps against a 3.16 shell, but so be it.
Comment 6 Jonas Ådahl 2015-03-11 03:38:22 UTC
Comment on attachment 298682 [details] [review]
wayland: Only bind to supported gtk-shell versions

Attachment 298682 [details] pushed as b434486 - wayland: Only bind to supported gtk-shell versions
Comment 7 Jonas Ådahl 2015-03-16 02:35:03 UTC
Created attachment 299484 [details] [review]
wayland: Add support for gtk_window_set_modal

Add two new requests to the gtk_surface interface: set_modal and
unset_modal. The server will currently not do anything special with
input focus, and its up to the client to ignore events on the parent
surface.

This commit bumps the gtk_shell interface version to 2. By connecting to
a Wayland server with another gtk_shell interface version any features
depending on the gtk_shell protocol will not be available.
Comment 8 Matthias Clasen 2015-03-16 10:45:34 UTC
Review of attachment 299484 [details] [review]:

::: gdk/wayland/gdkdisplay-wayland.c
@@ +70,3 @@
  */
 
+#define SUPPORTED_GTK_SHELL_VERSION 2

Shouldn't we move this define to the header where we just relocated the other version define to ?
Comment 9 Jonas Ådahl 2015-03-16 12:05:22 UTC
Created attachment 299503 [details] [review]
wayland: Move gtk-shell compatibility version define too
Comment 10 Jonas Ådahl 2015-03-16 12:05:28 UTC
Created attachment 299504 [details] [review]
wayland: Add support for gtk_window_set_modal

Add two new requests to the gtk_surface interface: set_modal and
unset_modal. The server will currently not do anything special with
input focus, and its up to the client to ignore events on the parent
surface.

This commit bumps the gtk_shell interface version to 2. By connecting to
a Wayland server with another gtk_shell interface version any features
depending on the gtk_shell protocol will not be available.
Comment 11 Matthias Clasen 2015-03-16 13:45:06 UTC
Review of attachment 299503 [details] [review]:

sure, looks fine
Comment 12 Matthias Clasen 2015-03-16 13:45:38 UTC
Review of attachment 299504 [details] [review]:

good to go once we branch.
Comment 13 Matthias Clasen 2015-03-16 17:59:39 UTC
Comment on attachment 299503 [details] [review]
wayland: Move gtk-shell compatibility version define too

Attachment 299503 [details] pushed as 4e930ad - wayland: Move gtk-shell compatibility version define too
Comment 14 Jonas Ådahl 2015-04-23 08:38:38 UTC
Attachment 299504 [details] pushed as 3da7394 - wayland: Add support for gtk_window_set_modal