Commit 539b1083 authored by Paolo Borelli's avatar Paolo Borelli

broadway: get the core pointer from the device manager

https://bugzilla.gnome.org/show_bug.cgi?id=762820
parent 363f9c95
......@@ -96,28 +96,11 @@ gdk_broadway_display_init_input (GdkDisplay *display)
g_list_free (list);
/* Now set "core" pointer to the first
* master device that is a pointer.
*/
list = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
for (l = list; l; l = l->next)
{
device = l->data;
if (gdk_device_get_source (device) != GDK_SOURCE_MOUSE)
continue;
display->core_pointer = device;
break;
}
G_GNUC_END_IGNORE_DEPRECATIONS;
/* Add the core pointer to the devices list */
display->core_pointer = GDK_BROADWAY_DEVICE_MANAGER (device_manager)->core_pointer;
broadway_display->input_devices = g_list_prepend (broadway_display->input_devices,
g_object_ref (display->core_pointer));
g_list_free (list);
g_object_ref (display->core_pointer));
G_GNUC_END_IGNORE_DEPRECATIONS;
}
GdkDisplay *
......
......@@ -136,8 +136,8 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
event->crossing.state = message->pointer.state;
event->crossing.mode = message->crossing.mode;
event->crossing.detail = GDK_NOTIFY_ANCESTOR;
gdk_event_set_device (event, display->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (display->core_pointer));
gdk_event_set_device (event, device_manager->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, message->base.serial);
......@@ -157,8 +157,8 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
event->crossing.state = message->pointer.state;
event->crossing.mode = message->crossing.mode;
event->crossing.detail = GDK_NOTIFY_ANCESTOR;
gdk_event_set_device (event, display->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (display->core_pointer));
gdk_event_set_device (event, device_manager->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, message->base.serial);
......@@ -179,8 +179,8 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
event->motion.x_root = message->pointer.root_x;
event->motion.y_root = message->pointer.root_y;
event->motion.state = message->pointer.state;
gdk_event_set_device (event, display->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (display->core_pointer));
gdk_event_set_device (event, device_manager->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, message->base.serial);
......@@ -205,8 +205,8 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
event->button.y_root = message->pointer.root_y;
event->button.button = message->button.button;
event->button.state = message->pointer.state;
gdk_event_set_device (event, display->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (display->core_pointer));
gdk_event_set_device (event, device_manager->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, message->base.serial);
......@@ -225,8 +225,8 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
event->scroll.x_root = message->pointer.root_x;
event->scroll.y_root = message->pointer.root_y;
event->scroll.direction = message->scroll.dir == 0 ? GDK_SCROLL_UP : GDK_SCROLL_DOWN;
gdk_event_set_device (event, display->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (display->core_pointer));
gdk_event_set_device (event, device_manager->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, message->base.serial);
......@@ -270,7 +270,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
gdk_event_set_device (event, device_manager->core_pointer);
gdk_event_set_source_device (event, device_manager->touchscreen);
gdk_event_set_seat (event, gdk_device_get_seat (display->core_pointer));
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
if (message->touch.is_emulated)
_gdk_event_set_pointer_emulated (event, TRUE);
......@@ -306,7 +306,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
break;
case BROADWAY_EVENT_GRAB_NOTIFY:
case BROADWAY_EVENT_UNGRAB_NOTIFY:
_gdk_display_device_grab_update (display, display->core_pointer, display->core_pointer, message->base.serial);
_gdk_display_device_grab_update (display, device_manager->core_pointer, device_manager->core_pointer, message->base.serial);
break;
case BROADWAY_EVENT_CONFIGURE_NOTIFY:
......@@ -365,8 +365,8 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
event = gdk_event_new (GDK_FOCUS_CHANGE);
event->focus_change.window = g_object_ref (window);
event->focus_change.in = FALSE;
gdk_event_set_device (event, display->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (display->core_pointer));
gdk_event_set_device (event, device_manager->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, message->base.serial);
}
......@@ -376,8 +376,8 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
event = gdk_event_new (GDK_FOCUS_CHANGE);
event->focus_change.window = g_object_ref (window);
event->focus_change.in = TRUE;
gdk_event_set_device (event, display->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (display->core_pointer));
gdk_event_set_device (event, device_manager->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, message->base.serial);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment