GNOME Bugzilla – Bug 745721
wayland: Add support for gtk_window_set_modal
Last modified: 2015-04-23 08:38:42 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.
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.
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.
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.
Review of attachment 298682 [details] [review]: Actually, this one is fine to land before 3.16
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 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
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.
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 ?
Created attachment 299503 [details] [review] wayland: Move gtk-shell compatibility version define too
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.
Review of attachment 299503 [details] [review]: sure, looks fine
Review of attachment 299504 [details] [review]: good to go once we branch.
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
Attachment 299504 [details] pushed as 3da7394 - wayland: Add support for gtk_window_set_modal