GNOME Bugzilla – Bug 600774
add an OSD for fn-f7
Last modified: 2017-08-22 11:31:40 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
Created attachment 146971 [details] a screenshot
Created attachment 146972 [details] another screenshot, showing the current mode
Some details I forgot to mention: The patch shows the OSD on each output, except in clone mode.
While this oviously needs new icons, maybe this is also the time to change all those OSDs to moblin-like "simple" icons?
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.
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
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.
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) :)
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...
Federico, any chance some of your awesome artists could draw us some nice display configuration icons that work in an osd ?
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)
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.
Oh, and the patch above contains some very crude icons I made for my prototyping...
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) ;).
> 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 :-(
The thread on the XDG list is here: http://lists.freedesktop.org/archives/xdg/2009-December/011143.html
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.
Created attachment 149578 [details] OSD mockup -- simple glyphs
Created attachment 149579 [details] Hires icon style mockup
While those are both shiny, neither of them will look very consistent with the rest of our current OSD icons.
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.
I meant the icon style. I don't think using a win7-style OSD is seriously being considered.
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.
> 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...
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.
By the way, this is in progress in the "randr-osd" branch.
*** Bug 693671 has been marked as a duplicate of this bug. ***
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 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.
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
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 ***