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 675354 - Calibrator window can loose keyboard focus and be covered by other regular windows
Calibrator window can loose keyboard focus and be covered by other regular wi...
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Wacom
git master
Other Linux
: Normal normal
: ---
Assigned To: Peter Hutterer
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-05-03 09:45 UTC by Olivier Fourdan
Modified: 2012-06-14 17:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (2.67 KB, patch)
2012-05-03 09:45 UTC, Olivier Fourdan
none Details | Review
Proposed patch (1.81 KB, patch)
2012-05-03 12:10 UTC, Olivier Fourdan
committed Details | Review

Description Olivier Fourdan 2012-05-03 09:45:21 UTC
Created attachment 213358 [details] [review]
Proposed patch

Description:

During calibration, the calibrator window can loose focus or be covered by other regular windows, coming in the way of calibration.

To reproduce:

1. Run the test-calibrator test app from the gnome-control-center/panels/wacom/calibrator/ source tree
2. Press Alt-Tab

Actual result:

Another app window is raised above the calibrator window which loses keyboard focus (thus preventing "Escape" to exit the calibrator).

Expected result:

During calibration, no external window or event should come into the way of the calibrator window.

Proposed solution:

Currently, the calibrator window is a regular toplevel window set to fullsscreen, thus relying in the window manager to keep it above and retain focus.

A possible solution would be to make the calibrator window a popup window (ie an override redirect window, in the X terminology) that the Window manager cannot interfere with, and grab the keyboard device(s) for this window to avoid any interaction with any other window.

Proposed patch attached. Note, there is no gdk_device_ungrab() on unmap as GTK/GDK does that already for us in gdk_window_hide().
Comment 1 Bastien Nocera 2012-05-03 10:01:20 UTC
I don't think there's a need to do that. Use gtk_window_set_keep_above(), and dismiss the window if the person changes the window focus.
Comment 2 Olivier Fourdan 2012-05-03 10:07:15 UTC
(In reply to comment #1)
> I don't think there's a need to do that. Use gtk_window_set_keep_above(), and
> dismiss the window if the person changes the window focus.

Yeap, that would work as well. Will send another patch for that.
Comment 3 Olivier Fourdan 2012-05-03 12:10:06 UTC
Created attachment 213369 [details] [review]
Proposed patch

Updated patch as per comment #1
Comment 4 Bastien Nocera 2012-05-03 13:12:15 UTC
Review of attachment 213369 [details] [review]:

Looks good.
Comment 5 Bastien Nocera 2012-05-03 13:15:13 UTC
Review of attachment 213369 [details] [review]:

A couple of things though.

Keep the subject line under 72 chars, and it's "lose" not "loose".
Comment 6 Bastien Nocera 2012-06-14 17:13:11 UTC
Fixed the "looses" typo in the commit message, and corrected it to be shorter.