mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 14:00:09 +00:00
Drop the last mentions of motion hint events
The GDK_POINTER_MOTION_HINT_MASK enumeration value is gone, but we're still keeping around the "is_hint" field in GdkEventMotion, even though every backend sets it to `false` — except for the core X11 device manager.
This commit is contained in:
parent
66a3b07183
commit
bfcb978079
@ -99,8 +99,6 @@ struct _GdkEventExpose
|
||||
* @state: (type GdkModifierType): a bit-mask representing the state of
|
||||
* the modifier keys (e.g. Control, Shift and Alt) and the pointer
|
||||
* buttons. See #GdkModifierType.
|
||||
* @is_hint: set to 1 if this event is just a hint, see the
|
||||
* %GDK_POINTER_MOTION_HINT_MASK value of #GdkEventMask.
|
||||
* @device: the master device that the event originated from. Use
|
||||
* gdk_event_get_source_device() to get the slave device.
|
||||
* @x_root: the x coordinate of the pointer relative to the root of the
|
||||
@ -118,7 +116,6 @@ struct _GdkEventMotion
|
||||
gdouble y;
|
||||
gdouble *axes;
|
||||
guint state;
|
||||
gint16 is_hint;
|
||||
GdkDeviceTool *tool;
|
||||
gdouble x_root, y_root;
|
||||
GList *history;
|
||||
|
@ -316,7 +316,7 @@ get_event_mask_from_ns_event (NSEvent *nsevent)
|
||||
case NSOtherMouseUp:
|
||||
return GDK_BUTTON_RELEASE_MASK;
|
||||
case NSMouseMoved:
|
||||
return GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK;
|
||||
return GDK_POINTER_MOTION_MASK;
|
||||
case NSScrollWheel:
|
||||
/* Since applications that want button press events can get
|
||||
* scroll events on X11 (since scroll wheel events are really
|
||||
@ -324,20 +324,18 @@ get_event_mask_from_ns_event (NSEvent *nsevent)
|
||||
*/
|
||||
return GDK_SCROLL_MASK | GDK_BUTTON_PRESS_MASK;
|
||||
case NSLeftMouseDragged:
|
||||
return (GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
|
||||
return (GDK_POINTER_MOTION_MASK |
|
||||
GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK |
|
||||
GDK_BUTTON1_MASK);
|
||||
case NSRightMouseDragged:
|
||||
return (GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
|
||||
return (GDK_POINTER_MOTION_MASK |
|
||||
GDK_BUTTON_MOTION_MASK | GDK_BUTTON3_MOTION_MASK |
|
||||
GDK_BUTTON3_MASK);
|
||||
case NSOtherMouseDragged:
|
||||
{
|
||||
GdkEventMask mask;
|
||||
|
||||
mask = (GDK_POINTER_MOTION_MASK |
|
||||
GDK_POINTER_MOTION_HINT_MASK |
|
||||
GDK_BUTTON_MOTION_MASK);
|
||||
mask = (GDK_POINTER_MOTION_MASK | GDK_BUTTON_MOTION_MASK);
|
||||
|
||||
if (get_mouse_button_from_ns_event (nsevent) == 2)
|
||||
mask |= (GDK_BUTTON2_MOTION_MASK | GDK_BUTTON2_MOTION_MASK |
|
||||
@ -535,7 +533,6 @@ generate_motion_event (GdkWindow *window)
|
||||
/* FIXME event->axes */
|
||||
event->motion.state = _gdk_quartz_events_get_current_keyboard_modifiers () |
|
||||
_gdk_quartz_events_get_current_mouse_modifiers ();
|
||||
event->motion.is_hint = FALSE;
|
||||
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_device_manager);
|
||||
event->motion.device = device_manager->core_pointer;
|
||||
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
|
||||
@ -1070,7 +1067,6 @@ fill_motion_event (GdkWindow *window,
|
||||
/* FIXME event->axes */
|
||||
event->motion.state = get_keyboard_modifiers_from_ns_event (nsevent) |
|
||||
_gdk_quartz_events_get_current_mouse_modifiers ();
|
||||
event->motion.is_hint = FALSE;
|
||||
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_device_manager);
|
||||
event->motion.device = device_manager->core_pointer;
|
||||
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
|
||||
|
@ -1482,7 +1482,6 @@ pointer_handle_motion (void *data,
|
||||
event->motion.time = time;
|
||||
event->motion.axes = NULL;
|
||||
event->motion.state = device_get_modifiers (seat->master_pointer);
|
||||
event->motion.is_hint = 0;
|
||||
gdk_event_set_display (event, seat->display);
|
||||
|
||||
get_coordinates (seat->master_pointer,
|
||||
@ -3525,7 +3524,6 @@ tablet_tool_handle_motion (void *data,
|
||||
gdk_event_set_device_tool (event, tool->tool);
|
||||
event->motion.time = tablet->pointer_info.time;
|
||||
event->motion.state = device_get_modifiers (tablet->master);
|
||||
event->motion.is_hint = FALSE;
|
||||
gdk_event_set_display (event, seat->display);
|
||||
|
||||
get_coordinates (tablet->master,
|
||||
|
@ -1123,7 +1123,6 @@ gdk_input_other_event (GdkDisplay *display,
|
||||
else
|
||||
{
|
||||
event->motion.time = _gdk_win32_get_next_tick (msg->time);
|
||||
event->motion.is_hint = FALSE;
|
||||
gdk_event_set_device (event, device_manager->core_pointer);
|
||||
gdk_event_set_source_device (event, GDK_DEVICE (source_device));
|
||||
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
|
||||
|
@ -815,10 +815,9 @@ _gdk_win32_print_event (const GdkEvent *event)
|
||||
event->expose.count);
|
||||
break;
|
||||
case GDK_MOTION_NOTIFY:
|
||||
g_print ("(%.4g,%.4g) (%.4g,%.4g) %s",
|
||||
g_print ("(%.4g,%.4g) (%.4g,%.4g)",
|
||||
event->motion.x, event->motion.y,
|
||||
event->motion.x_root, event->motion.y_root,
|
||||
event->motion.is_hint ? "HINT " : "");
|
||||
event->motion.x_root, event->motion.y_root);
|
||||
print_event_state (event->motion.state);
|
||||
break;
|
||||
case GDK_BUTTON_PRESS:
|
||||
@ -2947,7 +2946,6 @@ gdk_event_translate (MSG *msg,
|
||||
event->motion.y_root = current_root_y;
|
||||
event->motion.axes = NULL;
|
||||
event->motion.state = build_pointer_event_state (msg);
|
||||
event->motion.is_hint = FALSE;
|
||||
gdk_event_set_device (event, device_manager_win32->core_pointer);
|
||||
gdk_event_set_source_device (event, device_manager_win32->system_pointer);
|
||||
gdk_event_set_seat (event, gdk_device_get_seat (device_manager_win32->core_pointer));
|
||||
|
@ -595,7 +595,6 @@ gdk_x11_device_manager_core_translate_event (GdkEventTranslator *translator,
|
||||
event->motion.y_root = (gdouble) xevent->xmotion.y_root / scale;
|
||||
event->motion.axes = NULL;
|
||||
event->motion.state = (GdkModifierType) xevent->xmotion.state;
|
||||
event->motion.is_hint = xevent->xmotion.is_hint;
|
||||
gdk_event_set_device (event, device_manager->core_pointer);
|
||||
|
||||
gdk_event_set_display (event, display);
|
||||
|
@ -1643,9 +1643,6 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
|
||||
|
||||
event->motion.state = _gdk_x11_device_xi2_translate_state (&xev->mods, &xev->buttons, &xev->group);
|
||||
|
||||
/* There doesn't seem to be motion hints in XI */
|
||||
event->motion.is_hint = FALSE;
|
||||
|
||||
event->motion.axes = translate_axes (device,
|
||||
event->motion.x,
|
||||
event->motion.y,
|
||||
|
Loading…
Reference in New Issue
Block a user