[gtk+/gtk-3-16] Stop using GDK_POINTER_MOTION_HINT_MASK in widgets
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-16] Stop using GDK_POINTER_MOTION_HINT_MASK in widgets
- Date: Mon, 23 Mar 2015 03:16:02 +0000 (UTC)
commit bff9f190aa9ae918673ed0dfc017d3c257313ba7
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Mar 22 00:49:16 2015 -0400
Stop using GDK_POINTER_MOTION_HINT_MASK in widgets
It is deprecated and no longer needed, and,as observed in
https://bugzilla.gnome.org/show_bug.cgi?id=746253 it
interferes with turning off event compression.
gtk/gtkentry.c | 2 --
gtk/gtklabel.c | 3 +--
gtk/gtkrange.c | 15 +++++++--------
gtk/gtkspinbutton.c | 2 +-
gtk/gtkswitch.c | 1 -
gtk/gtktextview.c | 17 ++++++++---------
gtk/gtktreeviewcolumn.c | 1 -
gtk/gtkwidget.c | 6 ++----
8 files changed, 19 insertions(+), 28 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index a8f54c1..6668da6 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -3195,7 +3195,6 @@ realize_icon_info (GtkWidget *widget,
GDK_BUTTON_RELEASE_MASK |
GDK_BUTTON1_MOTION_MASK |
GDK_BUTTON3_MOTION_MASK |
- GDK_POINTER_MOTION_HINT_MASK |
GDK_POINTER_MOTION_MASK |
GDK_ENTER_NOTIFY_MASK |
GDK_LEAVE_NOTIFY_MASK);
@@ -3314,7 +3313,6 @@ gtk_entry_realize (GtkWidget *widget)
GDK_BUTTON_RELEASE_MASK |
GDK_BUTTON1_MOTION_MASK |
GDK_BUTTON3_MOTION_MASK |
- GDK_POINTER_MOTION_HINT_MASK |
GDK_POINTER_MOTION_MASK |
GDK_ENTER_NOTIFY_MASK |
GDK_LEAVE_NOTIFY_MASK);
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index bb900aa..396ae97 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -5357,8 +5357,7 @@ gtk_label_create_window (GtkLabel *label)
GDK_BUTTON_RELEASE_MASK |
GDK_LEAVE_NOTIFY_MASK |
GDK_BUTTON_MOTION_MASK |
- GDK_POINTER_MOTION_MASK |
- GDK_POINTER_MOTION_HINT_MASK;
+ GDK_POINTER_MOTION_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_NOREDIR;
if (gtk_widget_is_sensitive (widget) && priv->select_info && priv->select_info->selectable)
{
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 40b8f56..ce3f54b 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -1650,14 +1650,13 @@ gtk_range_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_ONLY;
attributes.event_mask = gtk_widget_get_events (widget);
- attributes.event_mask |= (GDK_BUTTON_PRESS_MASK |
- GDK_BUTTON_RELEASE_MASK |
- GDK_SCROLL_MASK |
- GDK_SMOOTH_SCROLL_MASK |
- GDK_ENTER_NOTIFY_MASK |
- GDK_LEAVE_NOTIFY_MASK |
- GDK_POINTER_MOTION_MASK |
- GDK_POINTER_MOTION_HINT_MASK);
+ attributes.event_mask |= GDK_BUTTON_PRESS_MASK |
+ GDK_BUTTON_RELEASE_MASK |
+ GDK_SCROLL_MASK |
+ GDK_SMOOTH_SCROLL_MASK |
+ GDK_ENTER_NOTIFY_MASK |
+ GDK_LEAVE_NOTIFY_MASK |
+ GDK_POINTER_MOTION_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y;
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 0c69775..74567f3 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -1093,7 +1093,7 @@ gtk_spin_button_realize (GtkWidget *widget)
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_ENTER_NOTIFY_MASK
- | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK;
+ | GDK_POINTER_MOTION_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c
index 1ab12b5..fbce536 100644
--- a/gtk/gtkswitch.c
+++ b/gtk/gtkswitch.c
@@ -487,7 +487,6 @@ gtk_switch_realize (GtkWidget *widget)
attributes.event_mask |= (GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK |
GDK_BUTTON1_MOTION_MASK |
- GDK_POINTER_MOTION_HINT_MASK |
GDK_POINTER_MOTION_MASK |
GDK_ENTER_NOTIFY_MASK |
GDK_LEAVE_NOTIFY_MASK);
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 9895698..a247586 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -9421,15 +9421,14 @@ text_window_realize (GtkTextWindow *win,
attributes.y = 0;
attributes.width = win->allocation.width;
attributes.height = win->allocation.height;
- attributes.event_mask = (GDK_EXPOSURE_MASK |
- GDK_SCROLL_MASK |
- GDK_SMOOTH_SCROLL_MASK |
- GDK_KEY_PRESS_MASK |
- GDK_BUTTON_PRESS_MASK |
- GDK_BUTTON_RELEASE_MASK |
- GDK_POINTER_MOTION_MASK |
- GDK_POINTER_MOTION_HINT_MASK |
- gtk_widget_get_events (win->widget));
+ attributes.event_mask = gtk_widget_get_events (win->widget)
+ | GDK_EXPOSURE_MASK
+ | GDK_SCROLL_MASK
+ | GDK_SMOOTH_SCROLL_MASK
+ | GDK_KEY_PRESS_MASK
+ | GDK_BUTTON_PRESS_MASK
+ | GDK_BUTTON_RELEASE_MASK
+ | GDK_POINTER_MOTION_MASK;
win->bin_window = gdk_window_new (win->window,
&attributes,
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index 5dd5b22..9e1cba8 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -1360,7 +1360,6 @@ _gtk_tree_view_column_realize_button (GtkTreeViewColumn *column)
(GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_MASK |
- GDK_POINTER_MOTION_HINT_MASK |
GDK_KEY_PRESS_MASK);
attributes_mask = GDK_WA_CURSOR | GDK_WA_X | GDK_WA_Y;
attr.cursor = gdk_cursor_new_for_display
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 25ba751..8409ef7 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -15246,14 +15246,12 @@ gtk_widget_real_set_has_tooltip (GtkWidget *widget,
gdk_window_set_events (priv->window,
gdk_window_get_events (priv->window) |
GDK_LEAVE_NOTIFY_MASK |
- GDK_POINTER_MOTION_MASK |
- GDK_POINTER_MOTION_HINT_MASK);
+ GDK_POINTER_MOTION_MASK);
if (gtk_widget_get_has_window (widget))
gtk_widget_add_events (widget,
GDK_LEAVE_NOTIFY_MASK |
- GDK_POINTER_MOTION_MASK |
- GDK_POINTER_MOTION_HINT_MASK);
+ GDK_POINTER_MOTION_MASK);
}
g_object_set_qdata (G_OBJECT (widget), quark_has_tooltip,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]