GNOME Bugzilla – Bug 589562
Make it possible to hide monitor labels
Last modified: 2011-08-25 18:42:02 UTC
This is a feature request for gnome-display-properties to make the monitor identification optional and off by default. If you are unsure what the monitor identification is, I have attached a picture to explain. It may have another name but this is what I know it as. The rationale behind this request is basic usability. Many times, people will only use the display preferences to set up an external monitor or projector for a short period of time. By not closing gnome-display-properties, the monitor identification is there constantly, and on top of every other window/menu (but below the cursor). I have seen too many presentations, with the monitor/projector was identified, to go on without reporting a feature request. Looking at how other OSs do this, there is an Identify or Identify Monitors button which then displays the monitor number. Perhaps we should have a checkbox that turns on and off the monitor identification option.
Reported downstream: https://bugs.launchpad.net/gnome-control-center/+bug/403840
Created attachment 139128 [details] Monitor Identification
We can probably hide the identifier windows if the main gnome-display-properties window loses the focus. I'll take a patch for this. Currently, gnome-desktop/libgnome-desktop/gnome-rr-labeler.c's gnome_rr_labeler_hide() just destroys the windows. You'll want to modify it to hide them instead. Then, add a gnome_rr_labeler_show() that shows the windows again. Then you'll need to patch gnome-display-properties to call those functions as appropriate when it loses/gains the focus. For bonus points, hide the windows a short time after the dialog loses the focus, not immediately.
*** Bug 590318 has been marked as a duplicate of this bug. ***
Let's start with the gnome-desktop changes.
Actually, gnome-desktop may not need changes - you can simply destroy the windows and re-create a GnomeRRLabeler when you need it again. If you want to do something more exotic like fade out the labels, then gnome-desktop *will* need changes.
Created attachment 183605 [details] [review] Add ability to show and hide the monitor labels (to make the display properties capplet able to hide them when it loses focus)
Created attachment 183606 [details] [review] Only show monitor labels when display applet has focus
I made these patches for GNOME 2.32 and confirmed they worked, I haven't been able to compile the GNOME Control Center 3 one, please check that! The patches simply hide the monitor labels when the dialog window loses focus. There is the side-effect that using combo boxes and dragging the window causes them to hide, but this seems minor. I couldn't work out if GTK/X can tell me "doe this window or any of it's subwindows have focus".
The patch also changes the default behaviour of the monitor labels to not be shown. I don't know if any other code is using this object, my guess was there wasn't so it wouldn't be a problem.
gnome-control-center bug is bug 625476
Review of attachment 183605 [details] [review]: These look pretty good! Please go ahead and push them.
Review of attachment 183606 [details] [review]: Looks good. Any reason to use connect_after() rather than plain connect()?
Errrr, one minor detail. You removed the call to create_label_windows() from setup_from_config() - as you said, this makes the labels hidden by default. Please keep them shown by default; the tray icon from gnome-settings-daemon assumes this. (The alternative is to make the g-s-d plugin show the labels explicitly, but if you create a labeler is because you want the labels to be shown - so I'd rather keep them shown by default. It's OK to hide/show them on focus events.)
We're in hard code freeze, so please wait until we branch for 3.0.
And actually, please also write API doc for the new API. It's a shame that the libgnome-desktop API is so badly documented, and we should stop adding API without doc.
Patches have status "accepted-commit_after_freeze". Assuming this refers to 3.0 Hardcode Freeze, can this get a commit now?
It's new API. This can go in 3.1/3.2, not 3.0.x.
Comment on attachment 183605 [details] [review] Add ability to show and hide the monitor labels (to make the display properties capplet able to hide them when it loses focus) Pushed to master (3.1.x)
Comment on attachment 183606 [details] [review] Only show monitor labels when display applet has focus Pushed to master (3.1.x)
In the future, don't commit without one of the gnome-control-center maintainers checking, and don't commit unstable changes when we're not even branched. I should add that nowhere here do I see any reviews by usability or design folks.
Sorry, didn't notice you hadn't branched and didn't check who marked the patch "accepted, commit now". Reassigned this bug to gnome-control-center.
Fixed gnome-desktop as well. Next time, check whether the modules have actually been branched.
Attachment 183606 [details] pushed as 3d91e4b - Only show monitor labels when display applet has focus
FWIW, the gnome-control-center code didn't actually work.