[totem] main: Fix use of obsolete gdk_window_get_pointer()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] main: Fix use of obsolete gdk_window_get_pointer()
- Date: Wed, 6 Mar 2013 22:29:16 +0000 (UTC)
commit 4f489fb8b02104345ca0f1e3a095c9c12873ea51
Author: Bastien Nocera <hadess hadess net>
Date: Wed Mar 6 22:15:01 2013 +0100
main: Fix use of obsolete gdk_window_get_pointer()
src/totem-object.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/totem-object.c b/src/totem-object.c
index 0578031..824b86a 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -2250,9 +2250,11 @@ drag_motion_video_cb (GtkWidget *widget,
guint _time,
Totem *totem)
{
+ GdkDevice *device;
GdkModifierType mask;
- gdk_window_get_pointer (gtk_widget_get_window (widget), NULL, NULL, &mask);
+ device = gdk_drag_context_get_device (context);
+ gdk_device_get_state (device, gtk_widget_get_window (widget), NULL, &mask);
if (mask & GDK_CONTROL_MASK) {
gdk_drag_status (context, GDK_ACTION_COPY, _time);
} else if (mask & GDK_MOD1_MASK || gdk_drag_context_get_suggested_action (context) == GDK_ACTION_ASK)
{
@@ -2299,9 +2301,11 @@ drag_motion_playlist_cb (GtkWidget *widget,
guint _time,
Totem *totem)
{
+ GdkDevice *device;
GdkModifierType mask;
- gdk_window_get_pointer (gtk_widget_get_window (widget), NULL, NULL, &mask);
+ device = gdk_drag_context_get_device (context);
+ gdk_device_get_state (device, gtk_widget_get_window (widget), NULL, &mask);
if (mask & GDK_MOD1_MASK || gdk_drag_context_get_suggested_action (context) == GDK_ACTION_ASK)
gdk_drag_status (context, GDK_ACTION_ASK, _time);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]