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 600774 - add an OSD for fn-f7
add an OSD for fn-f7
Status: RESOLVED DUPLICATE of bug 783550
Product: gnome-settings-daemon
Classification: Core
Component: media-keys
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
: 693671 (view as bug list)
Depends on: 600951
Blocks:
 
 
Reported: 2009-11-05 03:37 UTC by Matthias Clasen
Modified: 2017-08-22 11:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (129.56 KB, patch)
2009-11-05 03:37 UTC, Matthias Clasen
none Details | Review
a screenshot (93.13 KB, image/png)
2009-11-05 03:40 UTC, Matthias Clasen
  Details
another screenshot, showing the current mode (99.50 KB, image/png)
2009-11-05 03:40 UTC, Matthias Clasen
  Details
new patch (164.78 KB, patch)
2009-11-07 04:28 UTC, Matthias Clasen
needs-work Details | Review
OSD mockup -- simple glyphs (793.45 KB, image/png)
2009-12-11 11:01 UTC, Jakub Steiner
  Details
Hires icon style mockup (799.86 KB, image/png)
2009-12-11 11:02 UTC, Jakub Steiner
  Details

Description Matthias Clasen 2009-11-05 03:37:16 UTC
Created attachment 146970 [details] [review]
patch

Giving feedback is in general a good idea, and this will make it much easier to
understand the cycling. My patch adds some extra benefit, by allowing to cycle
to to the config you want without doing all the mode switches on the way, by
waiting a bit before activating each config. It also indicates the current
config visually, letting you 'go back'. And it avoids setting the same mode
again, for reduced flicker.

The patch itself is clearly still prototype, in at least two aspects:

- I just made up some quick icons, this needs proper ones

- It copies the GsdMediaKeysWindow from the media keys plugin and hacks it up.
This code should probably be shared in some way
Comment 1 Matthias Clasen 2009-11-05 03:40:04 UTC
Created attachment 146971 [details]
a screenshot
Comment 2 Matthias Clasen 2009-11-05 03:40:29 UTC
Created attachment 146972 [details]
another screenshot, showing the current mode
Comment 3 Matthias Clasen 2009-11-05 03:45:19 UTC
Some details I forgot to mention: The patch shows the OSD on each output, except in clone mode.
Comment 4 Michael Monreal 2009-11-05 08:57:50 UTC
While this oviously needs new icons, maybe this is also the time to change all those OSDs to moblin-like "simple" icons?
Comment 5 Bastien Nocera 2009-11-05 13:10:10 UTC
Jens, when you've branched gnome-settings-daemon for 2.28, I'll commit my OSD patches, and update the OSD to allow for more generic settings.

We also want an OSD for the touchpad disable feature, which would fall in the same category.
Comment 6 Matthias Clasen 2009-11-07 04:28:32 UTC
Created attachment 147156 [details] [review]
new patch

Another version of the patch, with the following improvements:
- handle the 'stored' configuration correctly
- ignore XF86Display events that happen due to lid open/close
Comment 7 Federico Mena Quintero 2009-11-23 18:19:47 UTC
Minor nitpick - we use "mirror screens" rather than "clone" or "cloned".  The OSD should do the same.

Translators have mentioned that "mirror screens" is not very obvious, even though we have a comment in the source that explains what "mirror screens" is about.  Cookies for you if you can come up with better terminology :)

Thanks for working on this, Matthias; it will make things much more obvious for users.
Comment 8 Federico Mena Quintero 2009-11-23 18:30:42 UTC
More nitpicking!

GsdRRConfig.type is an int.  Make it a typedef-ed enum, for clarity.

One thing I didn't understand is that the enum's values grow by 2, but elsewhere in the code you just seem to do type++ when you switch to the next type.  Am I missing something?

The "Stored" type is probably not very clear... it means "use the configuration I had at some previous point in time, after I clicked 'Apply' in the capplet" --- that is the only time a configuration gets saved to disk.  Some options for this:

- Show something like "Detecting previously-used monitors: (Acer 19", Samsung 24")" to let the user know what's going on.

- Remove the Stored type altogether, and instead try to do a good job of making things Just Work(tm) when you plug them in and hit XF86Display for the first time.  When I'm about to give a presentation, I just plug in the projector and hit the hotkey, hoping that it will work... using the capplet is just a last-resort thing (before actually embarrassing myself and running xrandr by hand, of course) :)
Comment 9 Matthias Clasen 2009-11-23 18:45:54 UTC
Yeah, the +2 is mysterious. I needed to differentiate between 'config foo' and 'currently selected config foo'. This is certainly not meant to be a final, polished patch...thanks for having a look anyway.

I plan to revisit this and clean it up if and when icons appear from somewhere...
Comment 10 Matthias Clasen 2009-12-01 17:56:12 UTC
Federico, any chance some of your awesome artists could draw us some nice display configuration icons that work in an osd ?
Comment 11 Jakub Steiner 2009-12-02 23:33:16 UTC
Matthias, you're on the OSD thread on XDG. Do these additions to the name spec cover your display OSD needs or did I miss something?

display-internal
display-external
display-mirror (both displays show the same image; same resolution)
display-both (desktop extended across multiple displays)
Comment 12 Matthias Clasen 2009-12-03 00:13:19 UTC
Almost. The code also optionally cycles through the 'current' and the 'stored' configuration, if these are not identical to one of the four you mention.
Comment 13 Matthias Clasen 2009-12-03 00:14:21 UTC
Oh, and the patch above contains some very crude icons I made for my prototyping...
Comment 14 Jakub Steiner 2009-12-03 17:47:00 UTC
Can you explain when you show display-current and display-stored? I only thought of these in the context of laptops, but I see this is being shown for desktops as well?

Btw that laptop icon is actually a generic media player (ipod sort) ;).
Comment 15 Matthias Clasen 2009-12-03 20:15:54 UTC
> Can you explain when you show display-current and display-stored? I only
> thought of these in the context of laptops, but I see this is being shown for
> desktops as well?

Federico can probably answer that better than me. I don't know exactly under what circumstances the current or stored configuration can be different from one of the 'stock' configurations. I guess opening the display capplet and tweaking the configuration would get you there.

> Btw that laptop icon is actually a generic media player (ipod sort) ;).

Right. If I had any artistic skills, or had an artist at my disposal, I'd have that fixed already. But I don't have either :-(
Comment 16 Federico Mena Quintero 2009-12-10 20:45:48 UTC
The thread on the XDG list is here: http://lists.freedesktop.org/archives/xdg/2009-December/011143.html
Comment 17 Federico Mena Quintero 2009-12-10 22:03:02 UTC
For screenshots of what the Windows 7 thing looks like when you press Win-P, look at "step 3" here:

http://www.sevenforums.com/tutorials/2019-display-projection-switch.html

If you press Win-P repeatedly, without releasing the Win key, you cycle among the options.  When you release the Win key, the highlighted option gets applied.  This is identical to how Alt-Tab feels.
Comment 18 Jakub Steiner 2009-12-11 11:01:14 UTC
Created attachment 149578 [details]
OSD mockup -- simple glyphs
Comment 19 Jakub Steiner 2009-12-11 11:02:00 UTC
Created attachment 149579 [details]
Hires icon style mockup
Comment 20 Matthias Clasen 2009-12-11 13:35:47 UTC
While those are both shiny, neither of them will look very consistent with the rest of our current OSD icons.
Comment 21 Bastien Nocera 2009-12-14 10:46:45 UTC
Do you mean the icon style, or the OSD window itself? I think that the main problem with using such a window (similar to the Alt+Tab behaviour) is that we can't detect the "Fn" key still being pressed, so we can't implement a similar cycling without have Win+P bound in the same way.
Comment 22 Matthias Clasen 2009-12-14 13:01:58 UTC
I meant the icon style.
I don't think using a win7-style OSD is seriously being considered.
Comment 23 Jakub Steiner 2009-12-15 10:26:27 UTC
When talking to Federico, he specifically mentioned the use case of standing in front of an audience, getting hooked up to a projector and not wanting to look like a doofus.

If we toggle the different output modes immidiately, that equals to looking like a doofus because it takes a good amount of time for a projector to pick up signal. You would toggle the key combination and wait a few seconds to see if that is the intended outcome. You actually don't need OSD all that much as you're essentially looking for any picture coming from a projected image behind you, thus you also need to break your neck.

Even if it's not possible to have Fn behave like Alt, I think it would be desirable to have the "windows 7" like OSD for the display selection, simply using a delay mechanism. Seeing all the choices and being able to toggle into the desired one is a major benefit for that case. The choice would not be applied until after a timer runs out. That way you can make the selection without looking at all the connected outputs.

As for the icon style, I do prefer the symbolic simple stencils, but that highly detailed style isn't something thought up for this particularly, this style is being phased in for all icons in gnome-icon-theme for 2.30.
Comment 24 Matthias Clasen 2009-12-15 13:41:39 UTC
> If we toggle the different output modes immidiately, that equals to looking
> like a doofus because it takes a good amount of time for a projector to pick up
> signal

Thats why my code doesn't do that. It gives you half a second before it attempts to switch to the mode thats shown in the osd, to let you cycle through the modes and select the one you want.

I get the distinct impression that nobody here has tried my patch...
Comment 25 Federico Mena Quintero 2009-12-17 21:29:01 UTC
I'm installing 2.28 so that I can test Matthias's patch :)

I've been giving some thought to how XF86Display should work.  We have three situations:

1. Your display is fucked and you can't see a thing.  So you hit the hotkey to "just give me something that works".  We should ensure that at least one output is connected/on (e.g. the built-in LCD) and that it is set to a mode that the display says it supports (instead of a random resolution).

2. You are in front of an audience.  You plug in the projector.  If hotplug works, the display should be Mirrored.  If hotplug doesn't work, you hit XF86Display.  You want to be presented with options, where the default is Mirror Screens.  This is where I'd like to have a menu similar to Win7's:  Internal, Mirror, Extended, External, Custom.

3. You are at home/office/etc. and you actually have time to fiddle with things.  You hit XF86Display to see if one of the options suits your needs; otherwise you select "Custom" and you get taken to gnome-display-properties, where you can tweak to your heart's content.

Ideally I'd like XF86Display to bring up a window with these options:

  [Internal]    Mirror     Extended     External     Custom

You can move among them with the arrow keys and hit Enter, or you can hit Esc to cancel.  Pressing XF86Display while the window is up has no effect.

Impossible options would just not appear in the menu:  "Extended" and "External" would not appear if you don't have a second monitor connected.

We need two versions of the "Extended" icon, one for a left-to-right layout and one for a top-to-bottom one.  Top-to-bottom sucks, but it's the only way to get an extended display on shitty Intel cards which can only do 2048x2048 framebuffers.

Opinions/comments? :)  I'll be glad to move Matthias's patch in this direction.  Give me a pretty toplevel window and I'll do wonders inside it.
Comment 26 Federico Mena Quintero 2010-01-20 18:24:46 UTC
By the way, this is in progress in the "randr-osd" branch.
Comment 27 Bastien Nocera 2013-02-14 07:04:57 UTC
*** Bug 693671 has been marked as a duplicate of this bug. ***
Comment 28 Bastián Díaz 2013-02-22 20:08:11 UTC
I hope that this functionality can be "resurrected" and implemented together with new displays design.

I could see that it will implement a notification that pops up when you connect a new monitor or projector. I hope that this idea of ​​the notification to be complementary to the OSD, as in the case of all types of laptop's would be faster and more convenient to use the key combination. (for example, if I'm doing a presentation and mistaken my choice in the notification popup, would be faster change settings via fn + f7 before opening the system settings)
Comment 29 Bastien Nocera 2013-06-05 10:07:17 UTC
Comment on attachment 147156 [details] [review]
new patch

Marking as needs-work, as that code won't apply anymore. We'd need updated design, and to figure out how to make gnome-shell show up the OSD for us.
Comment 30 mattia.b89 2016-09-22 10:48:59 UTC
I'd like to change bug title to a more generic one, since in my laptop the charged key combination is Fn+F8...
e.g OSD for display/monitor change/configuration
Comment 31 Bastien Nocera 2017-08-22 11:31:40 UTC
This is now implemented in gnome-shell directly. The old architecture we had made adding this functionality really difficult. See bug 783550 for details.

*** This bug has been marked as a duplicate of bug 783550 ***