[mutter/wip/multitouchr: 55/73] frames: Use the triggering device when updating controls
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/multitouchr: 55/73] frames: Use the triggering device when updating controls
- Date: Sat, 3 Nov 2012 23:54:50 +0000 (UTC)
commit acbd4bf5997e7c4ef1dd9b1e2f91ff6e922f0ca7
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jul 27 00:29:32 2011 +0200
frames: Use the triggering device when updating controls
src/ui/frames.c | 25 +++++++++++++++++--------
1 files changed, 17 insertions(+), 8 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index a3845ea..7fc85ff 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -51,6 +51,7 @@ static void meta_frames_unmap (GtkWidget *widget);
static void meta_frames_update_prelit_control (MetaFrames *frames,
MetaUIFrame *frame,
+ GdkDevice *device,
MetaFrameControl control);
static gboolean meta_frames_button_press_event (GtkWidget *widget,
GdkEventButton *event);
@@ -1584,7 +1585,9 @@ meta_frames_button_release_event (GtkWidget *widget,
* prelit so to let the user know that it can now be pressed.
* :)
*/
- meta_frames_update_prelit_control (frames, frame, control);
+ meta_frames_update_prelit_control (frames, frame,
+ gdk_event_get_device ((GdkEvent *) event),
+ control);
}
return TRUE;
@@ -1593,14 +1596,12 @@ meta_frames_button_release_event (GtkWidget *widget,
static void
meta_frames_update_prelit_control (MetaFrames *frames,
MetaUIFrame *frame,
+ GdkDevice *device,
MetaFrameControl control)
{
MetaFrameControl old_control;
- GdkDevice *device;
MetaCursor cursor;
- device = gtk_get_current_event_device ();
-
meta_verbose ("Updating prelit control from %u to %u\n",
frame->prelit_control, control);
@@ -1769,7 +1770,9 @@ meta_frames_motion_notify_event (GtkWidget *widget,
control = META_FRAME_CONTROL_NONE;
/* Update prelit control and cursor */
- meta_frames_update_prelit_control (frames, frame, control);
+ meta_frames_update_prelit_control (frames, frame,
+ gdk_event_get_device ((GdkEvent *) event),
+ control);
}
break;
case META_GRAB_OP_NONE:
@@ -1781,7 +1784,9 @@ meta_frames_motion_notify_event (GtkWidget *widget,
control = get_control (frames, frame, x, y);
/* Update prelit control and cursor */
- meta_frames_update_prelit_control (frames, frame, control);
+ meta_frames_update_prelit_control (frames, frame,
+ gdk_event_get_device ((GdkEvent *) event),
+ control);
}
break;
@@ -2101,7 +2106,9 @@ meta_frames_enter_notify_event (GtkWidget *widget,
return FALSE;
control = get_control (frames, frame, event->x, event->y);
- meta_frames_update_prelit_control (frames, frame, control);
+ meta_frames_update_prelit_control (frames, frame,
+ gdk_event_get_device ((GdkEvent *) event),
+ control);
return TRUE;
}
@@ -2119,7 +2126,9 @@ meta_frames_leave_notify_event (GtkWidget *widget,
if (frame == NULL)
return FALSE;
- meta_frames_update_prelit_control (frames, frame, META_FRAME_CONTROL_NONE);
+ meta_frames_update_prelit_control (frames, frame,
+ gdk_event_get_device ((GdkEvent *) event),
+ META_FRAME_CONTROL_NONE);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]