GNOME Bugzilla – Bug 745720
wayland: Add set_modal to gtk_surface
Last modified: 2015-12-08 09:43:26 UTC
Make it possible for GTK+ clients to set the modal hint on Wayland surfaces. Do this by adding two new requests to interface gtk_surface. I added both set_modal and unset_modal simply since that's the GTK+ API. No changes to any focus model is done, pointer events etc are sent as normal. There are also a patch adding version checking to the gtk_shell protocol, and one adding a enum value that had been added to the protocol xml file in the gtk+ repo. The 'wayland: Add and implement set/unset_modal for the gtk_surface interface' patch should be pushed together with the corresponding GTK+ patch.
Created attachment 298679 [details] [review] wayland: Sync protocol/gtk-shell.xml from GTK+ Had added a new capability enum value.
Created attachment 298680 [details] [review] wayland: Kill clients who try to bind an incompatible gtk_shell version gtk_shell is not backward compatible, and clients binding to it should check whether the advertised version is the same as the client supports.
Created attachment 298681 [details] [review] wayland: Add and implement set/unset_modal for the gtk_surface interface Add set_modal ond unset_modal to the gtk_surface interface. When a surface is modal, the compositor can treat it differently from non-modal dialogs, for example attach it to the parent window if any. There is currently no changes to input device focus; it is up to the client to ignore events to the parent surface that is wanted. This bumps the gtk_shell version to 2.
Review of attachment 298680 [details] [review]: This patch should perhaps still go into 3.15.
Review of attachment 298679 [details] [review]: Oh, yes.
Review of attachment 298681 [details] [review]: this may have to wait for 3.17 to open. I assume this is enough to make attached dialogs work as expected ?
(In reply to Matthias Clasen from comment #7) > Review of attachment 298681 [details] [review] [review]: > > this may have to wait for 3.17 to open. I assume this is enough to make > attached dialogs work as expected ? Yes, it seems to work as expected; at least when testing using gtk3-demo. I have not tested going from set_modal(1) to set_modal(0). The gtk API and current gtk_surface interface allows it, but I haven't seen anyone using it anywhere, or the point of it really.
*** Bug 736145 has been marked as a duplicate of this bug. ***
Attachment 298679 [details] pushed as cfba0a5 - wayland: Sync protocol/gtk-shell.xml from GTK+ Attachment 298680 [details] pushed as df3b412 - wayland: Kill clients who try to bind an incompatible gtk_shell version Attachment 298681 [details] pushed as eb6c701 - wayland: Add and implement set/unset_modal for the gtk_surface interface