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 745720 - wayland: Add set_modal to gtk_surface
wayland: Add set_modal to gtk_surface
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
: 736145 (view as bug list)
Depends on:
Blocks: 745721
 
 
Reported: 2015-03-06 04:23 UTC by Jonas Ådahl
Modified: 2015-12-08 09:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: Sync protocol/gtk-shell.xml from GTK+ (843 bytes, patch)
2015-03-06 04:23 UTC, Jonas Ådahl
committed Details | Review
wayland: Kill clients who try to bind an incompatible gtk_shell version (2.25 KB, patch)
2015-03-06 04:24 UTC, Jonas Ådahl
committed Details | Review
wayland: Add and implement set/unset_modal for the gtk_surface interface (5.32 KB, patch)
2015-03-06 04:25 UTC, Jonas Ådahl
committed Details | Review

Description Jonas Ådahl 2015-03-06 04:23:51 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.
Comment 1 Jonas Ådahl 2015-03-06 04:23:55 UTC
Created attachment 298679 [details] [review]
wayland: Sync protocol/gtk-shell.xml from GTK+

Had added a new capability enum value.
Comment 2 Jonas Ådahl 2015-03-06 04:24:02 UTC
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.
Comment 3 Jonas Ådahl 2015-03-06 04:25:32 UTC
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.
Comment 4 Matthias Clasen 2015-03-09 23:48:31 UTC
Review of attachment 298680 [details] [review]:

This patch should perhaps still go into 3.15.
Comment 5 Matthias Clasen 2015-03-09 23:48:41 UTC
Review of attachment 298680 [details] [review]:

This patch should perhaps still go into 3.15.
Comment 6 Matthias Clasen 2015-03-09 23:49:12 UTC
Review of attachment 298679 [details] [review]:

Oh, yes.
Comment 7 Matthias Clasen 2015-03-09 23:53:56 UTC
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 ?
Comment 8 Jonas Ådahl 2015-03-11 03:41:22 UTC
(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.
Comment 9 Matthias Clasen 2015-03-25 02:07:57 UTC
*** Bug 736145 has been marked as a duplicate of this bug. ***
Comment 10 Jonas Ådahl 2015-04-23 08:37:52 UTC
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