GNOME Bugzilla – Bug 704086
Screen brightness OSDs should appear on the affected screen
Last modified: 2014-11-13 18:35:15 UTC
It would make more sense to me, at least
Since bug 712664, it is possible to specify the monitor index the OSD should appear on. It's up to g-s-d to use it for the brightness OSD, so reassigning.
*** Bug 740034 has been marked as a duplicate of this bug. ***
Created attachment 290651 [details] [review] power: pass the monitor id to OSD notifications for brightness It only makes sense to show the brightness indicator on the display the brightness of which is being controlled. Pass the monitor id to the brightness OSD window so that the shell will place it on the right monitor for us.
Review of attachment 290651 [details] [review]: I'd prefer the power plugin changes to be separate, as we'll probably need to change the shell as well. ::: plugins/media-keys/gsd-media-keys-manager.c @@ +850,2 @@ /* Show OSD */ + show_osd (manager, "media-eject-symbolic", NULL, -1, -1); Can you add a: #define ALL_MONITORS -1 or something like that? Makes the calls easier to read. ::: plugins/power/gpm-common.c @@ +521,3 @@ + + output = get_primary_output (rr_screen); + if (output == NULL) { No need for braces on one-line conditionals.
Created attachment 290652 [details] [review] power: add a method to retrieve the backlight output id We're going to use this later.
Created attachment 290653 [details] [review] power: return output id when changing screen brightness When StepUp() or StepDown() are called to change the screen brightness, also return the output id where the brightness transition happened (if any). This is useful so that the shell can show the OSD only on the relevant monitor, which will be done in the next commit.
Created attachment 290654 [details] [review] media-keys: pass output id to show_osd() This is currently used by the brightness change OSD.
Review of attachment 290652 [details] [review]: Looks good otherwise. ::: plugins/power/gpm-common.c @@ +521,3 @@ + + output = get_primary_output (rr_screen); + if (output == NULL) { The braces!
Created attachment 290655 [details] [review] power: add a method to retrieve the backlight output id -- Fix the braces!
Review of attachment 290655 [details] [review]: Looks good
Review of attachment 290654 [details] [review]: Looks good.
Review of attachment 290653 [details] [review]: Looks fine.
Attachment 290653 [details] pushed as 5c17bd0 - power: return output id when changing screen brightness Attachment 290654 [details] pushed as 8685daa - media-keys: pass output id to show_osd() Attachment 290655 [details] pushed as a653c34 - power: add a method to retrieve the backlight output id