[gnome-desktop] Ignore all events on the display labels
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop] Ignore all events on the display labels
- Date: Tue, 8 May 2012 22:32:44 +0000 (UTC)
commit a7fcdf155d25ff51baf2a37b3fa3adeda622161b
Author: William Jon McCann <jmccann redhat com>
Date: Tue May 8 16:40:22 2012 -0400
Ignore all events on the display labels
https://bugzilla.gnome.org/show_bug.cgi?id=675696
libgnome-desktop/gnome-rr-labeler.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/libgnome-desktop/gnome-rr-labeler.c b/libgnome-desktop/gnome-rr-labeler.c
index f8a0217..755bb8e 100644
--- a/libgnome-desktop/gnome-rr-labeler.c
+++ b/libgnome-desktop/gnome-rr-labeler.c
@@ -278,6 +278,17 @@ position_window (GnomeRRLabeler *labeler,
gtk_window_move (GTK_WINDOW (window), workarea.x, workarea.y);
}
+static void
+label_window_realize_cb (GtkWidget *widget)
+{
+ cairo_region_t *region;
+
+ /* make the whole window ignore events */
+ region = cairo_region_create ();
+ gtk_widget_input_shape_combine_region (widget, region);
+ cairo_region_destroy (region);
+}
+
static GtkWidget *
create_label_window (GnomeRRLabeler *labeler, GnomeRROutputInfo *output, GdkRGBA *rgba)
{
@@ -301,6 +312,8 @@ create_label_window (GnomeRRLabeler *labeler, GnomeRROutputInfo *output, GdkRGBA
g_signal_connect (window, "draw",
G_CALLBACK (label_window_draw_event_cb), labeler);
+ g_signal_connect (window, "realize",
+ G_CALLBACK (label_window_realize_cb), labeler);
if (gnome_rr_config_get_clone (labeler->priv->config)) {
/* Keep this string in sync with gnome-control-center/capplets/display/xrandr-capplet.c:get_display_name() */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]