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 690549 - Make screenshot work in the OSD
Make screenshot work in the OSD
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: wacom
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: Olivier Fourdan
gnome-settings-daemon-maint
Depends on: 691856
Blocks:
 
 
Reported: 2012-12-20 10:30 UTC by Bastien Nocera
Modified: 2013-01-28 14:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (8.75 KB, patch)
2012-12-21 09:24 UTC, Olivier Fourdan
none Details | Review
Proposed patch (8.86 KB, patch)
2012-12-21 09:28 UTC, Olivier Fourdan
none Details | Review
Updated patch to use gdk_window_set_fullscreen_mode() API (11.62 KB, patch)
2013-01-23 15:31 UTC, Olivier Fourdan
committed Details | Review

Description Bastien Nocera 2012-12-20 10:30:47 UTC
At least. As far as I'm concerned, I would have made only the "show help" button on the tablet, or a window switch, dismiss the OSD.
Comment 1 Olivier Fourdan 2012-12-21 08:14:24 UTC
There is actually a technical reason for the current design.

Among the functionality of the OSD window, I meant it to show where the tablet is mapped on screen, ie if the tablet is mapped to a single monitor in a dual head setup, the OSD would show on that monitor alone (that obviously applies to screen tablets, and that's a plus for those as well). When the tablet is mapped to the entire screen, including all monitors in a multi-head setup, then the OSD would cover the entire screen.

For this to work, we need to bypass the window manager completely (the window manager would always restrain fullscreen windows to a single monitor), so I opted for a popup type window (an override redirect window in X terminology).

I spent a lot of time on this, and I really think using an override redirect window is the only way to reliably achieve the desired behavior.

But those windows never get focused by the window manager (of course, since the window manager would ignore those) so the only way to capture keyboard events is to actually grab the keyboard. But as noticed, that prevents other keyboard functions to work properly, such as the screenshot in gnome-shell.

So what I would do instead, is to:

 - Remove the grab on the keyboard
 - Add a timeout to automatically hide the OSD after a short period of time of inactivity on the tablet

The OSD is really meant as a short lived info window, the more I think of it the more I believe it should not remain mapped for too long, so using a timeout here would make a lot of sense imho.
Comment 2 Olivier Fourdan 2012-12-21 09:24:17 UTC
Created attachment 232030 [details] [review]
Proposed patch

Implementing comment #1 timeout logic.
Comment 3 Olivier Fourdan 2012-12-21 09:28:30 UTC
Created attachment 232031 [details] [review]
Proposed patch

Fix tabs/spaces and removed extra line-feed.
Comment 4 Olivier Fourdan 2013-01-23 15:29:43 UTC
Removing ui-review keyword (as the UI does not change) and add dependency on GTK bug 691856 to implement fullscreen on all monitors.
Comment 5 Olivier Fourdan 2013-01-23 15:31:10 UTC
Created attachment 234217 [details] [review]
Updated patch to use gdk_window_set_fullscreen_mode() API
Comment 6 Bastien Nocera 2013-01-27 19:06:25 UTC
Review of attachment 234217 [details] [review]:

Looks fine to me. You'll need to bump the GTK+ dependency in configure.ac though.
Comment 7 Olivier Fourdan 2013-01-28 14:14:24 UTC
Comment on attachment 234217 [details] [review]
Updated patch to use gdk_window_set_fullscreen_mode() API

Committed and pushed, along with the GTK+ requirement bumped to 3.7.7