mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 02:50:41 -05:00
frames: Use the triggering device when updating controls
This commit is contained in:
parent
d05297593f
commit
8847281c31
@ -52,6 +52,7 @@ static void meta_frames_unmap (GtkWidget *widget);
|
|||||||
|
|
||||||
static void meta_frames_update_prelit_control (MetaFrames *frames,
|
static void meta_frames_update_prelit_control (MetaFrames *frames,
|
||||||
MetaUIFrame *frame,
|
MetaUIFrame *frame,
|
||||||
|
GdkDevice *device,
|
||||||
MetaFrameControl control);
|
MetaFrameControl control);
|
||||||
static gboolean meta_frames_button_press_event (GtkWidget *widget,
|
static gboolean meta_frames_button_press_event (GtkWidget *widget,
|
||||||
GdkEventButton *event);
|
GdkEventButton *event);
|
||||||
@ -1967,7 +1968,9 @@ meta_frames_button_release_event (GtkWidget *widget,
|
|||||||
* prelit so to let the user know that it can now be pressed.
|
* 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;
|
return TRUE;
|
||||||
@ -1976,14 +1979,12 @@ meta_frames_button_release_event (GtkWidget *widget,
|
|||||||
static void
|
static void
|
||||||
meta_frames_update_prelit_control (MetaFrames *frames,
|
meta_frames_update_prelit_control (MetaFrames *frames,
|
||||||
MetaUIFrame *frame,
|
MetaUIFrame *frame,
|
||||||
|
GdkDevice *device,
|
||||||
MetaFrameControl control)
|
MetaFrameControl control)
|
||||||
{
|
{
|
||||||
MetaFrameControl old_control;
|
MetaFrameControl old_control;
|
||||||
GdkDevice *device;
|
|
||||||
MetaCursor cursor;
|
MetaCursor cursor;
|
||||||
|
|
||||||
device = gtk_get_current_event_device ();
|
|
||||||
|
|
||||||
meta_verbose ("Updating prelit control from %u to %u\n",
|
meta_verbose ("Updating prelit control from %u to %u\n",
|
||||||
frame->prelit_control, control);
|
frame->prelit_control, control);
|
||||||
|
|
||||||
@ -2154,7 +2155,9 @@ meta_frames_motion_notify_event (GtkWidget *widget,
|
|||||||
control = META_FRAME_CONTROL_NONE;
|
control = META_FRAME_CONTROL_NONE;
|
||||||
|
|
||||||
/* Update prelit control and cursor */
|
/* 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);
|
||||||
|
|
||||||
/* No tooltip while in the process of clicking */
|
/* No tooltip while in the process of clicking */
|
||||||
}
|
}
|
||||||
@ -2168,7 +2171,9 @@ meta_frames_motion_notify_event (GtkWidget *widget,
|
|||||||
control = get_control (frames, frame, x, y);
|
control = get_control (frames, frame, x, y);
|
||||||
|
|
||||||
/* Update prelit control and cursor */
|
/* 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);
|
||||||
|
|
||||||
queue_tip (frames);
|
queue_tip (frames);
|
||||||
}
|
}
|
||||||
@ -2674,7 +2679,9 @@ meta_frames_enter_notify_event (GtkWidget *widget,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
control = get_control (frames, frame, event->x, event->y);
|
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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -2692,7 +2699,9 @@ meta_frames_leave_notify_event (GtkWidget *widget,
|
|||||||
if (frame == NULL)
|
if (frame == NULL)
|
||||||
return FALSE;
|
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);
|
||||||
|
|
||||||
clear_tip (frames);
|
clear_tip (frames);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user