1
Description: Only show monitor labels when display applet has focus
2
Author: Robert Ancell <robert.ancell@canonical.com>
3
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=589562
4
Bug-Ubuntu: https://bugs.launchpad.net/bugs/403840
6
Index: gnome-control-center-2.32.1/capplets/display/xrandr-capplet.c
7
===================================================================
8
--- gnome-control-center-2.32.1.orig/capplets/display/xrandr-capplet.c 2011-03-17 14:49:29.717410905 +1100
9
+++ gnome-control-center-2.32.1/capplets/display/xrandr-capplet.c 2011-03-17 14:49:27.167397090 +1100
13
app->labeler = gnome_rr_labeler_new (app->current_configuration);
14
+ if (gtk_widget_has_focus (app->dialog))
15
+ gnome_rr_labeler_show (app->labeler);
17
select_current_output_from_dialog_position (app);
19
@@ -2312,6 +2314,26 @@
24
+dialog_focus_in_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
29
+ gnome_rr_labeler_show (app->labeler);
34
+dialog_focus_out_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
39
+ gnome_rr_labeler_hide (app->labeler);
44
hide_help_button (App *app)
46
@@ -2466,6 +2488,10 @@
47
app->dialog = _gtk_builder_get_widget (builder, "dialog");
48
g_signal_connect_after (app->dialog, "map-event",
49
G_CALLBACK (dialog_map_event_cb), app);
50
+ g_signal_connect_after (app->dialog, "focus-in-event",
51
+ G_CALLBACK (dialog_focus_in_cb), app);
52
+ g_signal_connect_after (app->dialog, "focus-out-event",
53
+ G_CALLBACK (dialog_focus_out_cb), app);
55
gtk_window_set_default_icon_name ("preferences-desktop-display");
56
gtk_window_set_icon_name (GTK_WINDOW (app->dialog),