diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2020-06-18 19:22:20 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2020-06-18 19:22:20 +0100 |
commit | 1c856a208fdc9b435be60973e9c465f19b532863 (patch) | |
tree | ac979f50a9f429a10928e0066ae1be312af8c23b /gdk | |
parent | c7916c8e480f08c03f7ce9f77cbba87f2c9d949b (diff) | |
download | gtk+-1c856a208fdc9b435be60973e9c465f19b532863.tar.gz |
Rename master and slave device
We already use the "logical/virtual" and "physical" names in the
documentation, there's no reason to use loaded terms just because X11
uses them.
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/broadway/gdkdevice-broadway.c | 2 | ||||
-rw-r--r-- | gdk/broadway/gdkdisplay-broadway.c | 22 | ||||
-rw-r--r-- | gdk/gdkdevice.c | 128 | ||||
-rw-r--r-- | gdk/gdkdevice.h | 16 | ||||
-rw-r--r-- | gdk/gdkdeviceprivate.h | 15 | ||||
-rw-r--r-- | gdk/gdkdisplay.c | 6 | ||||
-rw-r--r-- | gdk/gdkdisplayprivate.h | 2 | ||||
-rw-r--r-- | gdk/gdkevents.c | 6 | ||||
-rw-r--r-- | gdk/gdkseat.c | 46 | ||||
-rw-r--r-- | gdk/gdkseat.h | 16 | ||||
-rw-r--r-- | gdk/gdkseatdefault.c | 108 | ||||
-rw-r--r-- | gdk/gdkseatdefaultprivate.h | 26 | ||||
-rw-r--r-- | gdk/gdkseatprivate.h | 12 | ||||
-rw-r--r-- | gdk/gdksurface.c | 22 | ||||
-rw-r--r-- | gdk/quartz/gdkdevicemanager-core-quartz.c | 8 | ||||
-rw-r--r-- | gdk/wayland/gdkdevice-wayland.c | 425 | ||||
-rw-r--r-- | gdk/win32/gdkdevice-win32.c | 2 | ||||
-rw-r--r-- | gdk/win32/gdkdevicemanager-win32.c | 24 | ||||
-rw-r--r-- | gdk/win32/gdkdevicemanager-win32.h | 4 | ||||
-rw-r--r-- | gdk/x11/gdkdevice-xi2.c | 12 | ||||
-rw-r--r-- | gdk/x11/gdkdevicemanager-xi2.c | 125 | ||||
-rw-r--r-- | gdk/x11/gdkdisplay-x11.c | 4 | ||||
-rw-r--r-- | gdk/x11/gdkmain-x11.c | 4 | ||||
-rw-r--r-- | gdk/x11/gdksurface-x11.c | 3 |
24 files changed, 525 insertions, 513 deletions
diff --git a/gdk/broadway/gdkdevice-broadway.c b/gdk/broadway/gdkdevice-broadway.c index 756a052e73..23fc5fd8dd 100644 --- a/gdk/broadway/gdkdevice-broadway.c +++ b/gdk/broadway/gdkdevice-broadway.c @@ -157,7 +157,7 @@ _gdk_broadway_surface_grab_check_unmap (GdkSurface *surface, seat = gdk_display_get_default_seat (display); - devices = gdk_seat_get_slaves (seat, GDK_SEAT_CAPABILITY_ALL); + devices = gdk_seat_get_physical_devices (seat, GDK_SEAT_CAPABILITY_ALL); devices = g_list_prepend (devices, gdk_seat_get_keyboard (seat)); devices = g_list_prepend (devices, gdk_seat_get_pointer (seat)); diff --git a/gdk/broadway/gdkdisplay-broadway.c b/gdk/broadway/gdkdisplay-broadway.c index 5a88b82064..fd82a1810e 100644 --- a/gdk/broadway/gdkdisplay-broadway.c +++ b/gdk/broadway/gdkdisplay-broadway.c @@ -119,7 +119,7 @@ create_core_pointer (GdkDisplay *display) { return g_object_new (GDK_TYPE_BROADWAY_DEVICE, "name", "Core Pointer", - "type", GDK_DEVICE_TYPE_MASTER, + "type", GDK_DEVICE_TYPE_LOGICAL, "source", GDK_SOURCE_MOUSE, "has-cursor", TRUE, "display", display, @@ -131,7 +131,7 @@ create_core_keyboard (GdkDisplay *display) { return g_object_new (GDK_TYPE_BROADWAY_DEVICE, "name", "Core Keyboard", - "type", GDK_DEVICE_TYPE_MASTER, + "type", GDK_DEVICE_TYPE_LOGICAL, "source", GDK_SOURCE_KEYBOARD, "has-cursor", FALSE, "display", display, @@ -143,7 +143,7 @@ create_pointer (GdkDisplay *display) { return g_object_new (GDK_TYPE_BROADWAY_DEVICE, "name", "Pointer", - "type", GDK_DEVICE_TYPE_SLAVE, + "type", GDK_DEVICE_TYPE_PHYSICAL, "source", GDK_SOURCE_MOUSE, "has-cursor", TRUE, "display", display, @@ -155,7 +155,7 @@ create_keyboard (GdkDisplay *display) { return g_object_new (GDK_TYPE_BROADWAY_DEVICE, "name", "Keyboard", - "type", GDK_DEVICE_TYPE_SLAVE, + "type", GDK_DEVICE_TYPE_PHYSICAL, "source", GDK_SOURCE_KEYBOARD, "has-cursor", FALSE, "display", display, @@ -167,7 +167,7 @@ create_touchscreen (GdkDisplay *display) { return g_object_new (GDK_TYPE_BROADWAY_DEVICE, "name", "Touchscreen", - "type", GDK_DEVICE_TYPE_SLAVE, + "type", GDK_DEVICE_TYPE_PHYSICAL, "source", GDK_SOURCE_TOUCHSCREEN, "has-cursor", FALSE, "display", display, @@ -196,15 +196,15 @@ _gdk_broadway_display_open (const gchar *display_name) _gdk_device_set_associated_device (broadway_display->pointer, broadway_display->core_pointer); _gdk_device_set_associated_device (broadway_display->keyboard, broadway_display->core_keyboard); _gdk_device_set_associated_device (broadway_display->touchscreen, broadway_display->core_pointer); - _gdk_device_add_slave (broadway_display->core_pointer, broadway_display->touchscreen); + _gdk_device_add_physical_device (broadway_display->core_pointer, broadway_display->touchscreen); - seat = gdk_seat_default_new_for_master_pair (broadway_display->core_pointer, - broadway_display->core_keyboard); + seat = gdk_seat_default_new_for_logical_pair (broadway_display->core_pointer, + broadway_display->core_keyboard); gdk_display_add_seat (display, seat); - gdk_seat_default_add_slave (GDK_SEAT_DEFAULT (seat), broadway_display->pointer); - gdk_seat_default_add_slave (GDK_SEAT_DEFAULT (seat), broadway_display->keyboard); - gdk_seat_default_add_slave (GDK_SEAT_DEFAULT (seat), broadway_display->touchscreen); + gdk_seat_default_add_physical_device (GDK_SEAT_DEFAULT (seat), broadway_display->pointer); + gdk_seat_default_add_physical_device (GDK_SEAT_DEFAULT (seat), broadway_display->keyboard); + gdk_seat_default_add_physical_device (GDK_SEAT_DEFAULT (seat), broadway_display->touchscreen); g_object_unref (seat); gdk_event_init (display); diff --git a/gdk/gdkdevice.c b/gdk/gdkdevice.c index 8072aea51e..a18d4d76b5 100644 --- a/gdk/gdkdevice.c +++ b/gdk/gdkdevice.c @@ -36,7 +36,7 @@ * as a keyboard, a mouse, a touchpad, etc. * * See the #GdkSeat documentation for more information - * about the various kinds of master and slave devices, and their + * about the various kinds of logical and physical devices, and their * relationships. */ @@ -152,15 +152,16 @@ gdk_device_class_init (GdkDeviceClass *klass) P_("Device type"), P_("Device role in the device manager"), GDK_TYPE_DEVICE_TYPE, - GDK_DEVICE_TYPE_MASTER, + GDK_DEVICE_TYPE_LOGICAL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); /** * GdkDevice:associated-device: * - * Associated pointer or keyboard with this device, if any. Devices of type #GDK_DEVICE_TYPE_MASTER - * always come in keyboard/pointer pairs. Other device types will have a %NULL associated device. + * Associated pointer or keyboard with this device, if any. Devices of + * type #GDK_DEVICE_TYPE_LOGICAL always come in keyboard/pointer pairs. + * Other device types will have a %NULL associated device. */ device_props[PROP_ASSOCIATED_DEVICE] = g_param_spec_object ("associated-device", @@ -187,7 +188,7 @@ gdk_device_class_init (GdkDeviceClass *klass) * GdkDevice:has-cursor: * * Whether the device is represented by a cursor on the screen. Devices of type - * %GDK_DEVICE_TYPE_MASTER will have %TRUE here. + * %GDK_DEVICE_TYPE_LOGICAL will have %TRUE here. */ device_props[PROP_HAS_CURSOR] = g_param_spec_boolean ("has-cursor", @@ -333,11 +334,11 @@ gdk_device_class_init (GdkDeviceClass *klass) * * The ::changed signal is emitted either when the #GdkDevice * has changed the number of either axes or keys. For example - * In X this will normally happen when the slave device routing - * events through the master device changes (for example, user - * switches from the USB mouse to a tablet), in that case the - * master device will change to reflect the new slave device - * axes and keys. + * on X11 this will normally happen when the physical device + * routing events through the logical device changes (for + * example, user switches from the USB mouse to a tablet); in + * that case the logical device will change to reflect the axes + * and keys on the new physical device. */ signals[CHANGED] = g_signal_new (g_intern_static_string ("changed"), @@ -394,14 +395,14 @@ gdk_device_dispose (GObject *object) GdkDevice *device = GDK_DEVICE (object); GdkDevice *associated = device->associated; - if (associated && device->type == GDK_DEVICE_TYPE_SLAVE) - _gdk_device_remove_slave (associated, device); + if (associated && device->type == GDK_DEVICE_TYPE_PHYSICAL) + _gdk_device_remove_physical_device (associated, device); if (associated) { device->associated = NULL; - if (device->type == GDK_DEVICE_TYPE_MASTER && + if (device->type == GDK_DEVICE_TYPE_LOGICAL && associated->associated == device) _gdk_device_set_associated_device (associated, NULL); @@ -539,21 +540,23 @@ gdk_device_get_property (GObject *object, * the axes of @device in, or %NULL. * @mask: (optional) (out): location to store the modifiers, or %NULL. * - * Gets the current state of a pointer device relative to @surface. As a slave - * device’s coordinates are those of its master pointer, this - * function may not be called on devices of type %GDK_DEVICE_TYPE_SLAVE, - * unless there is an ongoing grab on them. See gdk_seat_grab(). + * Gets the current state of a pointer device relative to @surface. As a + * physical device’s coordinates are those of its logical pointer, this + * function may not be called on devices of type %GDK_DEVICE_TYPE_PHYSICAL, + * unless there is an ongoing grab on them. + * + * See also: gdk_seat_grab(). */ void gdk_device_get_state (GdkDevice *device, - GdkSurface *surface, + GdkSurface *surface, gdouble *axes, GdkModifierType *mask) { g_return_if_fail (GDK_IS_DEVICE (device)); g_return_if_fail (device->source != GDK_SOURCE_KEYBOARD); g_return_if_fail (GDK_IS_SURFACE (surface)); - g_return_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_SLAVE || + g_return_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_PHYSICAL || gdk_display_device_is_grabbed (gdk_device_get_display (device), device)); if (GDK_DEVICE_GET_CLASS (device)->get_state) @@ -575,7 +578,7 @@ gdk_device_get_position (GdkDevice *device, { g_return_if_fail (GDK_IS_DEVICE (device)); g_return_if_fail (device->source != GDK_SOURCE_KEYBOARD); - g_return_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_SLAVE || + g_return_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_PHYSICAL || gdk_display_device_is_grabbed (gdk_device_get_display (device), device)); _gdk_device_query_state (device, NULL, NULL, x, y, NULL); @@ -593,8 +596,8 @@ gdk_device_get_position (GdkDevice *device, * double precision. Returns %NULL if the surface tree under @device is not known to GDK (for example, * belongs to another application). * - * As a slave device coordinates are those of its master pointer, This - * function may not be called on devices of type %GDK_DEVICE_TYPE_SLAVE, + * As a physical device coordinates are those of its logical pointer, this + * function may not be called on devices of type %GDK_DEVICE_TYPE_PHYSICAL, * unless there is an ongoing grab on them, see gdk_seat_grab(). * * Returns: (nullable) (transfer none): the #GdkSurface under the @@ -610,7 +613,7 @@ gdk_device_get_surface_at_position (GdkDevice *device, g_return_val_if_fail (GDK_IS_DEVICE (device), NULL); g_return_val_if_fail (device->source != GDK_SOURCE_KEYBOARD, NULL); - g_return_val_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_SLAVE || + g_return_val_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_PHYSICAL || gdk_display_device_is_grabbed (gdk_device_get_display (device), device), NULL); surface = _gdk_device_surface_at_position (device, &tmp_x, &tmp_y, NULL); @@ -717,15 +720,14 @@ gdk_device_get_display (GdkDevice *device) * gdk_device_get_associated_device: * @device: a #GdkDevice * - * Returns the associated device to @device, if @device is of type - * %GDK_DEVICE_TYPE_MASTER, it will return the paired pointer or - * keyboard. - * - * If @device is of type %GDK_DEVICE_TYPE_SLAVE, it will return - * the master device to which @device is attached to. + * Returns the #GdkDevice associated to @device: * - * If @device is of type %GDK_DEVICE_TYPE_FLOATING, %NULL will be - * returned, as there is no associated device. + * - if @device is of type %GDK_DEVICE_TYPE_LOGICAL, it will return + * the paired pointer or keyboard. + * - if @device is of type %GDK_DEVICE_TYPE_PHYSICAL, it will return + * the logical device to which @device is attached to. + * - if @device is of type %GDK_DEVICE_TYPE_FLOATING, %NULL will be + * returned, as there is no associated device. * * Returns: (nullable) (transfer none): The associated device, or * %NULL @@ -769,63 +771,59 @@ _gdk_device_set_associated_device (GdkDevice *device, if (associated) device->associated = g_object_ref (associated); - if (device->type != GDK_DEVICE_TYPE_MASTER) + if (device->type != GDK_DEVICE_TYPE_LOGICAL) { if (device->associated) - _gdk_device_set_device_type (device, GDK_DEVICE_TYPE_SLAVE); + _gdk_device_set_device_type (device, GDK_DEVICE_TYPE_PHYSICAL); else _gdk_device_set_device_type (device, GDK_DEVICE_TYPE_FLOATING); } } /** - * gdk_device_list_slave_devices: - * @device: a #GdkDevice + * gdk_device_list_physical_devices: + * @device: a logical #GdkDevice * - * If the device if of type %GDK_DEVICE_TYPE_MASTER, it will return - * the list of slave devices attached to it, otherwise it will return - * %NULL + * Returns the list of physical devices attached to the given logical + * #GdkDevice. * * Returns: (nullable) (transfer container) (element-type GdkDevice): - * the list of slave devices, or %NULL. The list must be - * freed with g_list_free(), the contents of the list are - * owned by GTK+ and should not be freed. - **/ + * the list of physical devices attached to a logical #GdkDevice + */ GList * -gdk_device_list_slave_devices (GdkDevice *device) +gdk_device_list_physical_devices (GdkDevice *device) { g_return_val_if_fail (GDK_IS_DEVICE (device), NULL); - g_return_val_if_fail (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_MASTER, NULL); + g_return_val_if_fail (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_LOGICAL, NULL); - return g_list_copy (device->slaves); + return g_list_copy (device->physical_devices); } void -_gdk_device_add_slave (GdkDevice *device, - GdkDevice *slave) +_gdk_device_add_physical_device (GdkDevice *device, + GdkDevice *physical) { - g_return_if_fail (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_MASTER); - g_return_if_fail (gdk_device_get_device_type (slave) != GDK_DEVICE_TYPE_MASTER); + g_return_if_fail (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_LOGICAL); + g_return_if_fail (gdk_device_get_device_type (physical) != GDK_DEVICE_TYPE_LOGICAL); - if (!g_list_find (device->slaves, slave)) - device->slaves = g_list_prepend (device->slaves, slave); + if (!g_list_find (device->physical_devices, physical)) + device->physical_devices = g_list_prepend (device->physical_devices, physical); } void -_gdk_device_remove_slave (GdkDevice *device, - GdkDevice *slave) +_gdk_device_remove_physical_device (GdkDevice *device, + GdkDevice *physical) { GList *elem; - g_return_if_fail (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_MASTER); - g_return_if_fail (gdk_device_get_device_type (slave) != GDK_DEVICE_TYPE_MASTER); - - elem = g_list_find (device->slaves, slave); + g_return_if_fail (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_LOGICAL); + g_return_if_fail (gdk_device_get_device_type (physical) != GDK_DEVICE_TYPE_LOGICAL); - if (!elem) + elem = g_list_find (device->physical_devices, physical); + if (elem == NULL) return; - device->slaves = g_list_delete_link (device->slaves, elem); + device->physical_devices = g_list_delete_link (device->physical_devices, elem); } /** @@ -839,7 +837,7 @@ _gdk_device_remove_slave (GdkDevice *device, GdkDeviceType gdk_device_get_device_type (GdkDevice *device) { - g_return_val_if_fail (GDK_IS_DEVICE (device), GDK_DEVICE_TYPE_MASTER); + g_return_val_if_fail (GDK_IS_DEVICE (device), GDK_DEVICE_TYPE_LOGICAL); return device->type; } @@ -1315,7 +1313,7 @@ gdk_device_get_last_event_surface (GdkDevice *device) /** * gdk_device_get_vendor_id: - * @device: a slave #GdkDevice + * @device: a physical #GdkDevice * * Returns the vendor ID of this device, or %NULL if this information couldn't * be obtained. This ID is retrieved from the device, and is thus constant for @@ -1350,14 +1348,14 @@ const gchar * gdk_device_get_vendor_id (GdkDevice *device) { g_return_val_if_fail (GDK_IS_DEVICE (device), NULL); - g_return_val_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_MASTER, NULL); + g_return_val_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_LOGICAL, NULL); return device->vendor_id; } /** * gdk_device_get_product_id: - * @device: a slave #GdkDevice + * @device: a physical #GdkDevice * * Returns the product ID of this device, or %NULL if this information couldn't * be obtained. This ID is retrieved from the device, and is thus constant for @@ -1369,7 +1367,7 @@ const gchar * gdk_device_get_product_id (GdkDevice *device) { g_return_val_if_fail (GDK_IS_DEVICE (device), NULL); - g_return_val_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_MASTER, NULL); + g_return_val_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_LOGICAL, NULL); return device->product_id; } @@ -1424,7 +1422,7 @@ gdk_device_update_tool (GdkDevice *device, GdkDeviceTool *tool) { g_return_if_fail (GDK_IS_DEVICE (device)); - g_return_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_MASTER); + g_return_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_LOGICAL); if (g_set_object (&device->last_tool, tool)) { diff --git a/gdk/gdkdevice.h b/gdk/gdkdevice.h index e018bb35aa..888775d06f 100644 --- a/gdk/gdkdevice.h +++ b/gdk/gdkdevice.h @@ -71,17 +71,17 @@ typedef enum /** * GdkDeviceType: - * @GDK_DEVICE_TYPE_MASTER: Device is a master (or virtual) device. There will - * be an associated focus indicator on the screen. - * @GDK_DEVICE_TYPE_SLAVE: Device is a slave (or physical) device. - * @GDK_DEVICE_TYPE_FLOATING: Device is a physical device, currently not attached to - * any seat. + * @GDK_DEVICE_TYPE_LOGICAL: Device is a logical device. There will + * be an associated focus indicator on the screen. + * @GDK_DEVICE_TYPE_PHYSICAL: Device is a physical device. + * @GDK_DEVICE_TYPE_FLOATING: Device is a physical device, currently + * not attached to any seat. * * Indicates the device type. */ typedef enum { - GDK_DEVICE_TYPE_MASTER, - GDK_DEVICE_TYPE_SLAVE, + GDK_DEVICE_TYPE_LOGICAL, + GDK_DEVICE_TYPE_PHYSICAL, GDK_DEVICE_TYPE_FLOATING } GdkDeviceType; @@ -141,7 +141,7 @@ GdkDisplay * gdk_device_get_display (GdkDevice *device); GDK_AVAILABLE_IN_ALL GdkDevice * gdk_device_get_associated_device (GdkDevice *device); GDK_AVAILABLE_IN_ALL -GList * gdk_device_list_slave_devices (GdkDevice *device); +GList * gdk_device_list_physical_devices (GdkDevice *device); GDK_AVAILABLE_IN_ALL GdkDeviceType gdk_device_get_device_type (GdkDevice *device); diff --git a/gdk/gdkdeviceprivate.h b/gdk/gdkdeviceprivate.h index e48c06f0b2..712ab70581 100644 --- a/gdk/gdkdeviceprivate.h +++ b/gdk/gdkdeviceprivate.h @@ -41,11 +41,11 @@ struct _GdkDevice gboolean has_cursor; GdkAxisFlags axis_flags; GdkDisplay *display; - /* Paired master for master, - * associated master for slaves + /* The paired logical device for logical devices, + * or the associated logical device for physical ones */ GdkDevice *associated; - GList *slaves; + GList *physical_devices; GdkDeviceType type; GArray *axes; guint num_touches; @@ -132,10 +132,11 @@ gboolean _gdk_device_translate_axis (GdkDevice *device, GdkTimeCoord ** _gdk_device_allocate_history (GdkDevice *device, gint n_events); -void _gdk_device_add_slave (GdkDevice *device, - GdkDevice *slave); -void _gdk_device_remove_slave (GdkDevice *device, - GdkDevice *slave); +void _gdk_device_add_physical_device (GdkDevice *device, + GdkDevice *physical); +void _gdk_device_remove_physical_device (GdkDevice *device, + GdkDevice *physical); + void _gdk_device_query_state (GdkDevice *device, GdkSurface *surface, GdkSurface **child_surface, diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c index d4e4b018ed..db13ea52c6 100644 --- a/gdk/gdkdisplay.c +++ b/gdk/gdkdisplay.c @@ -643,12 +643,12 @@ switch_to_pointer_grab (GdkDisplay *display, if (grab == NULL /* ungrab */ || (!last_grab->owner_events && grab->owner_events) /* switched to owner_events */ ) { - /* Ungrabbed slave devices don't have a position by - * itself, rather depend on its master pointer, so + /* Ungrabbed physical devices don't have a position by + * itself, rather depend on its logical pointer, so * it doesn't make sense to track any position for * these after the grab */ - if (grab || gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_SLAVE) + if (grab || gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_PHYSICAL) new_toplevel = get_current_toplevel (display, device, &x, &y, &state); if (new_toplevel) diff --git a/gdk/gdkdisplayprivate.h b/gdk/gdkdisplayprivate.h index 8f70e12aa4..d29cf2ebed 100644 --- a/gdk/gdkdisplayprivate.h +++ b/gdk/gdkdisplayprivate.h @@ -66,7 +66,7 @@ typedef struct gdouble toplevel_x, toplevel_y; guint32 state; guint32 button; - GdkDevice *last_slave; + GdkDevice *last_physical_device; } GdkPointerSurfaceInfo; struct _GdkDisplay diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c index b3e379ebe2..c9ad0df308 100644 --- a/gdk/gdkevents.c +++ b/gdk/gdkevents.c @@ -1205,9 +1205,9 @@ gdk_event_get_device (GdkEvent *event) * gdk_event_get_source_device: * @event: a #GdkEvent * - * This function returns the hardware (slave) #GdkDevice that has - * triggered the event, falling back to the virtual (master) device - * (as in gdk_event_get_device()) if the event wasn’t caused by + * This function returns the physical #GdkDevice that has triggered + * the event, falling back to the logical device, as returned by + * gdk_event_get_device(), if the event wasn’t caused by * interaction with a hardware device. This may happen for example * in synthesized crossing events after a #GdkSurface updates its * geometry or a grab is acquired/released. diff --git a/gdk/gdkseat.c b/gdk/gdkseat.c index bd29ddba34..d30e44d7c8 100644 --- a/gdk/gdkseat.c +++ b/gdk/gdkseat.c @@ -323,35 +323,35 @@ gdk_seat_ungrab (GdkSeat *seat) } /** - * gdk_seat_get_slaves: + * gdk_seat_get_physical_devices: * @seat: a #GdkSeat * @capabilities: capabilities to get devices for * - * Returns the slave devices that match the given capabilities. + * Returns the physical devices that match the given capabilities. * * Returns: (transfer container) (element-type GdkDevice): A list of #GdkDevices. * The list must be freed with g_list_free(), the elements are owned * by GDK and must not be freed. **/ GList * -gdk_seat_get_slaves (GdkSeat *seat, - GdkSeatCapabilities capabilities) +gdk_seat_get_physical_devices (GdkSeat *seat, + GdkSeatCapabilities capabilities) { GdkSeatClass *seat_class; g_return_val_if_fail (GDK_IS_SEAT (seat), NULL); seat_class = GDK_SEAT_GET_CLASS (seat); - return seat_class->get_slaves (seat, capabilities); + return seat_class->get_physical_devices (seat, capabilities); } /** * gdk_seat_get_pointer: * @seat: a #GdkSeat * - * Returns the master device that routes pointer events. + * Returns the logical device that routes pointer events. * - * Returns: (transfer none) (nullable): a master #GdkDevice with pointer + * Returns: (transfer none) (nullable): a logical #GdkDevice with pointer * capabilities. This object is owned by GTK and must not be freed. **/ GdkDevice * @@ -362,16 +362,16 @@ gdk_seat_get_pointer (GdkSeat *seat) g_return_val_if_fail (GDK_IS_SEAT (seat), NULL); seat_class = GDK_SEAT_GET_CLASS (seat); - return seat_class->get_master (seat, GDK_SEAT_CAPABILITY_POINTER); + return seat_class->get_logical_device (seat, GDK_SEAT_CAPABILITY_POINTER); } /** * gdk_seat_get_keyboard: * @seat: a #GdkSeat * - * Returns the master device that routes keyboard events. + * Returns the logical device that routes keyboard events. * - * Returns: (transfer none) (nullable): a master #GdkDevice with keyboard + * Returns: (transfer none) (nullable): a logical #GdkDevice with keyboard * capabilities. This object is owned by GTK and must not be freed. **/ GdkDevice * @@ -382,7 +382,7 @@ gdk_seat_get_keyboard (GdkSeat *seat) g_return_val_if_fail (GDK_IS_SEAT (seat), NULL); seat_class = GDK_SEAT_GET_CLASS (seat); - return seat_class->get_master (seat, GDK_SEAT_CAPABILITY_KEYBOARD); + return seat_class->get_logical_device (seat, GDK_SEAT_CAPABILITY_KEYBOARD); } void @@ -448,25 +448,29 @@ gdk_seat_get_tool (GdkSeat *seat, } /** - * gdk_seat_get_master_pointers: + * gdk_seat_get_logical_pointers: * @seat: The #GdkSeat * @capabilities: Queried capabilities * - * Returns all master pointers with the given capabilities driven by this @seat. - * On most backends this function will return a list with a single element (meaning - * that all input devices drive the same onscreen cursor). + * Returns all logical pointers with the given capabilities driven by + * this @seat. * - * In other backends where there can possibly be multiple foci (eg. wayland), - * this function will return all master #GdkDevices that represent these. + * On most windowing system backends this function will return a list + * with a single element (meaning that all input devices drive the same + * on-screen cursor). + * + * In other windowing systems where there can possibly be multiple + * foci (e.g. Wayland), this function will return all logical #GdkDevices + * that represent these. * * Returns: (transfer container) (element-type GdkDevice): A list - * of master pointing devices + * of logical pointing devices */ GList * -gdk_seat_get_master_pointers (GdkSeat *seat, - GdkSeatCapabilities capabilities) +gdk_seat_get_logical_pointers (GdkSeat *seat, + GdkSeatCapabilities capabilities) { g_return_val_if_fail (GDK_IS_SEAT (seat), NULL); - return GDK_SEAT_GET_CLASS (seat)->get_master_pointers (seat, capabilities); + return GDK_SEAT_GET_CLASS (seat)->get_logical_pointers (seat, capabilities); } diff --git a/gdk/gdkseat.h b/gdk/gdkseat.h index 10c8d722e4..5bc912ac7e 100644 --- a/gdk/gdkseat.h +++ b/gdk/gdkseat.h @@ -68,24 +68,24 @@ GDK_AVAILABLE_IN_ALL GType gdk_seat_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GdkDisplay * gdk_seat_get_display (GdkSeat *seat); +GdkDisplay * gdk_seat_get_display (GdkSeat *seat); GDK_AVAILABLE_IN_ALL GdkSeatCapabilities - gdk_seat_get_capabilities (GdkSeat *seat); + gdk_seat_get_capabilities (GdkSeat *seat); GDK_AVAILABLE_IN_ALL -GList * gdk_seat_get_slaves (GdkSeat *seat, - GdkSeatCapabilities capabilities); +GList * gdk_seat_get_physical_devices (GdkSeat *seat, + GdkSeatCapabilities capabilities); GDK_AVAILABLE_IN_ALL -GdkDevice * gdk_seat_get_pointer (GdkSeat *seat); +GdkDevice * gdk_seat_get_pointer (GdkSeat *seat); GDK_AVAILABLE_IN_ALL -GdkDevice * gdk_seat_get_keyboard (GdkSeat *seat); +GdkDevice * gdk_seat_get_keyboard (GdkSeat *seat); GDK_AVAILABLE_IN_ALL -GList * gdk_seat_get_master_pointers (GdkSeat *seat, - GdkSeatCapabilities capabilities); +GList * gdk_seat_get_logical_pointers (GdkSeat *seat, + GdkSeatCapabilities capabilities); G_END_DECLS diff --git a/gdk/gdkseatdefault.c b/gdk/gdkseatdefault.c index 26bf5ae967..2e187ccae5 100644 --- a/gdk/gdkseatdefault.c +++ b/gdk/gdkseatdefault.c @@ -25,10 +25,10 @@ typedef struct _GdkSeatDefaultPrivate GdkSeatDefaultPrivate; struct _GdkSeatDefaultPrivate { - GdkDevice *master_pointer; - GdkDevice *master_keyboard; - GList *slave_pointers; - GList *slave_keyboards; + GdkDevice *logical_pointer; + GdkDevice *logical_keyboard; + GList *physical_pointers; + GList *physical_keyboards; GdkSeatCapabilities capabilities; GPtrArray *tools; @@ -55,25 +55,25 @@ gdk_seat_dispose (GObject *object) GdkSeatDefaultPrivate *priv = gdk_seat_default_get_instance_private (seat); GList *l; - if (priv->master_pointer) + if (priv->logical_pointer) { - gdk_seat_device_removed (GDK_SEAT (seat), priv->master_pointer); - g_clear_object (&priv->master_pointer); + gdk_seat_device_removed (GDK_SEAT (seat), priv->logical_pointer); + g_clear_object (&priv->logical_pointer); } - if (priv->master_keyboard) + if (priv->logical_keyboard) { - gdk_seat_device_removed (GDK_SEAT (seat), priv->master_keyboard); - g_clear_object (&priv->master_pointer); + gdk_seat_device_removed (GDK_SEAT (seat), priv->logical_keyboard); + g_clear_object (&priv->logical_pointer); } - for (l = priv->slave_pointers; l; l = l->next) + for (l = priv->physical_pointers; l; l = l->next) { gdk_seat_device_removed (GDK_SEAT (seat), l->data); g_object_unref (l->data); } - for (l = priv->slave_keyboards; l; l = l->next) + for (l = priv->physical_keyboards; l; l = l->next) { gdk_seat_device_removed (GDK_SEAT (seat), l->data); g_object_unref (l->data); @@ -85,10 +85,10 @@ gdk_seat_dispose (GObject *object) priv->tools = NULL; } - g_list_free (priv->slave_pointers); - g_list_free (priv->slave_keyboards); - priv->slave_pointers = NULL; - priv->slave_keyboards = NULL; + g_list_free (priv->physical_pointers); + g_list_free (priv->physical_keyboards); + priv->physical_pointers = NULL; + priv->physical_keyboards = NULL; G_OBJECT_CLASS (gdk_seat_default_parent_class)->dispose (object); } @@ -148,7 +148,7 @@ gdk_seat_default_grab (GdkSeat *seat, if (capabilities & GDK_SEAT_CAPABILITY_TOUCH) pointer_evmask |= TOUCH_EVENTS; - status = gdk_device_grab (priv->master_pointer, surface, + status = gdk_device_grab (priv->logical_pointer, surface, GDK_OWNERSHIP_NONE, owner_events, pointer_evmask, cursor, evtime); @@ -157,7 +157,7 @@ gdk_seat_default_grab (GdkSeat *seat, if (status == GDK_GRAB_SUCCESS && capabilities & GDK_SEAT_CAPABILITY_KEYBOARD) { - status = gdk_device_grab (priv->master_keyboard, surface, + status = gdk_device_grab (priv->logical_keyboard, surface, GDK_OWNERSHIP_NONE, owner_events, KEYBOARD_EVENTS, cursor, evtime); @@ -165,7 +165,7 @@ gdk_seat_default_grab (GdkSeat *seat, if (status != GDK_GRAB_SUCCESS) { if (capabilities & ~GDK_SEAT_CAPABILITY_KEYBOARD) - gdk_device_ungrab (priv->master_pointer, evtime); + gdk_device_ungrab (priv->logical_pointer, evtime); } } @@ -185,14 +185,14 @@ gdk_seat_default_ungrab (GdkSeat *seat) priv = gdk_seat_default_get_instance_private (GDK_SEAT_DEFAULT (seat)); G_GNUC_BEGIN_IGNORE_DEPRECATIONS; - gdk_device_ungrab (priv->master_pointer, GDK_CURRENT_TIME); - gdk_device_ungrab (priv->master_keyboard, GDK_CURRENT_TIME); + gdk_device_ungrab (priv->logical_pointer, GDK_CURRENT_TIME); + gdk_device_ungrab (priv->logical_keyboard, GDK_CURRENT_TIME); G_GNUC_END_IGNORE_DEPRECATIONS; } static GdkDevice * -gdk_seat_default_get_master (GdkSeat *seat, - GdkSeatCapabilities capability) +gdk_seat_default_get_logical_device (GdkSeat *seat, + GdkSeatCapabilities capability) { GdkSeatDefaultPrivate *priv; @@ -203,9 +203,9 @@ gdk_seat_default_get_master (GdkSeat *seat, { case GDK_SEAT_CAPABILITY_POINTER: case GDK_SEAT_CAPABILITY_TOUCH: - return priv->master_pointer; + return priv->logical_pointer; case GDK_SEAT_CAPABILITY_KEYBOARD: - return priv->master_keyboard; + return priv->logical_keyboard; default: g_warning ("Unhandled capability %x", capability); break; @@ -264,8 +264,8 @@ append_filtered (GList *list, } static GList * -gdk_seat_default_get_slaves (GdkSeat *seat, - GdkSeatCapabilities capabilities) +gdk_seat_default_get_physical_devices (GdkSeat *seat, + GdkSeatCapabilities capabilities) { GdkSeatDefaultPrivate *priv; GList *devices = NULL; @@ -273,10 +273,10 @@ gdk_seat_default_get_slaves (GdkSeat *seat, priv = gdk_seat_default_get_instance_private (GDK_SEAT_DEFAULT (seat)); if (capabilities & (GDK_SEAT_CAPABILITY_ALL_POINTING)) - devices = append_filtered (devices, priv->slave_pointers, capabilities); + devices = append_filtered (devices, priv->physical_pointers, capabilities); if (capabilities & (GDK_SEAT_CAPABILITY_KEYBOARD | GDK_SEAT_CAPABILITY_TABLET_PAD)) - devices = append_filtered (devices, priv->slave_keyboards, capabilities); + devices = append_filtered (devices, priv->physical_keyboards, capabilities); return devices; } @@ -307,15 +307,15 @@ gdk_seat_default_get_tool (GdkSeat *seat, } static GList * -gdk_seat_default_get_master_pointers (GdkSeat *seat, +gdk_seat_default_get_logical_pointers (GdkSeat *seat, GdkSeatCapabilities capabilities) { - GList *masters = NULL; + GList *pointers = NULL; if (capabilities & GDK_SEAT_CAPABILITY_ALL_POINTING) - masters = g_list_prepend (masters, gdk_seat_get_pointer (seat)); + pointers = g_list_prepend (pointers, gdk_seat_get_pointer (seat)); - return masters; + return pointers; } static void @@ -331,9 +331,9 @@ gdk_seat_default_class_init (GdkSeatDefaultClass *klass) seat_class->grab = gdk_seat_default_grab; seat_class->ungrab = gdk_seat_default_ungrab; - seat_class->get_master = gdk_seat_default_get_master; - seat_class->get_slaves = gdk_seat_default_get_slaves; - seat_class->get_master_pointers = gdk_seat_default_get_master_pointers; + seat_class->get_logical_device = gdk_seat_default_get_logical_device; + seat_class->get_physical_devices = gdk_seat_default_get_physical_devices; + seat_class->get_logical_pointers = gdk_seat_default_get_logical_pointers; seat_class->get_tool = gdk_seat_default_get_tool; } @@ -344,8 +344,8 @@ gdk_seat_default_init (GdkSeatDefault *seat) } GdkSeat * -gdk_seat_default_new_for_master_pair (GdkDevice *pointer, - GdkDevice *keyboard) +gdk_seat_default_new_for_logical_pair (GdkDevice *pointer, + GdkDevice *keyboard) { GdkSeatDefaultPrivate *priv; GdkDisplay *display; @@ -358,18 +358,18 @@ gdk_seat_default_new_for_master_pair (GdkDevice *pointer, NULL); priv = gdk_seat_default_get_instance_private (GDK_SEAT_DEFAULT (seat)); - priv->master_pointer = g_object_ref (pointer); - priv->master_keyboard = g_object_ref (keyboard); + priv->logical_pointer = g_object_ref (pointer); + priv->logical_keyboard = g_object_ref (keyboard); - gdk_seat_device_added (seat, priv->master_pointer); - gdk_seat_device_added (seat, priv->master_keyboard); + gdk_seat_device_added (seat, priv->logical_pointer); + gdk_seat_device_added (seat, priv->logical_keyboard); return seat; } void -gdk_seat_default_add_slave (GdkSeatDefault *seat, - GdkDevice *device) +gdk_seat_default_add_physical_device (GdkSeatDefault *seat, + GdkDevice *device) { GdkSeatDefaultPrivate *priv; GdkSeatCapabilities capability; @@ -381,9 +381,9 @@ gdk_seat_default_add_slave (GdkSeatDefault *seat, capability = device_get_capability (device); if (capability & GDK_SEAT_CAPABILITY_ALL_POINTING) - priv->slave_pointers = g_list_prepend (priv->slave_pointers, g_object_ref (device)); + priv->physical_pointers = g_list_prepend (priv->physical_pointers, g_object_ref (device)); else if (capability & (GDK_SEAT_CAPABILITY_KEYBOARD | GDK_SEAT_CAPABILITY_TABLET_PAD)) - priv->slave_keyboards = g_list_prepend (priv->slave_keyboards, g_object_ref (device)); + priv->physical_keyboards = g_list_prepend (priv->physical_keyboards, g_object_ref (device)); else { g_critical ("Unhandled capability %x for device '%s'", @@ -397,8 +397,8 @@ gdk_seat_default_add_slave (GdkSeatDefault *seat, } void -gdk_seat_default_remove_slave (GdkSeatDefault *seat, - GdkDevice *device) +gdk_seat_default_remove_physical_device (GdkSeatDefault *seat, + GdkDevice *device) { GdkSeatDefaultPrivate *priv; GList *l; @@ -408,23 +408,23 @@ gdk_seat_default_remove_slave (GdkSeatDefault *seat, priv = gdk_seat_default_get_instance_private (seat); - if (g_list_find (priv->slave_pointers, device)) + if (g_list_find (priv->physical_pointers, device)) { - priv->slave_pointers = g_list_remove (priv->slave_pointers, device); + priv->physical_pointers = g_list_remove (priv->physical_pointers, device); priv->capabilities &= ~(GDK_SEAT_CAPABILITY_ALL_POINTING); - for (l = priv->slave_pointers; l; l = l->next) + for (l = priv->physical_pointers; l; l = l->next) priv->capabilities |= device_get_capability (GDK_DEVICE (l->data)); gdk_seat_device_removed (GDK_SEAT (seat), device); g_object_unref (device); } - else if (g_list_find (priv->slave_keyboards, device)) + else if (g_list_find (priv->physical_keyboards, device)) { - priv->slave_keyboards = g_list_remove (priv->slave_keyboards, device); + priv->physical_keyboards = g_list_remove (priv->physical_keyboards, device); priv->capabilities &= ~(GDK_SEAT_CAPABILITY_KEYBOARD | GDK_SEAT_CAPABILITY_TABLET_PAD); - for (l = priv->slave_keyboards; l; l = l->next) + for (l = priv->physical_keyboards; l; l = l->next) priv->capabilities |= device_get_capability (GDK_DEVICE (l->data)); gdk_seat_device_removed (GDK_SEAT (seat), device); diff --git a/gdk/gdkseatdefaultprivate.h b/gdk/gdkseatdefaultprivate.h index b641d4e29d..5e49ef6ec9 100644 --- a/gdk/gdkseatdefaultprivate.h +++ b/gdk/gdkseatdefaultprivate.h @@ -23,6 +23,8 @@ #include "gdkseat.h" #include "gdkseatprivate.h" +G_BEGIN_DECLS + #define GDK_TYPE_SEAT_DEFAULT (gdk_seat_default_get_type ()) #define GDK_SEAT_DEFAULT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_SEAT_DEFAULT, GdkSeatDefault)) #define GDK_IS_SEAT_DEFAULT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_SEAT_DEFAULT)) @@ -45,16 +47,18 @@ struct _GdkSeatDefaultClass GType gdk_seat_default_get_type (void) G_GNUC_CONST; -GdkSeat * gdk_seat_default_new_for_master_pair (GdkDevice *pointer, - GdkDevice *keyboard); - -void gdk_seat_default_add_slave (GdkSeatDefault *seat, - GdkDevice *device); -void gdk_seat_default_remove_slave (GdkSeatDefault *seat, - GdkDevice *device); -void gdk_seat_default_add_tool (GdkSeatDefault *seat, - GdkDeviceTool *tool); -void gdk_seat_default_remove_tool (GdkSeatDefault *seat, - GdkDeviceTool *tool); +GdkSeat * gdk_seat_default_new_for_logical_pair (GdkDevice *pointer, + GdkDevice *keyboard); + +void gdk_seat_default_add_physical_device (GdkSeatDefault *seat, + GdkDevice *device); +void gdk_seat_default_remove_physical_device (GdkSeatDefault *seat, + GdkDevice *device); +void gdk_seat_default_add_tool (GdkSeatDefault *seat, + GdkDeviceTool *tool); +void gdk_seat_default_remove_tool (GdkSeatDefault *seat, + GdkDeviceTool *tool); + +G_END_DECLS #endif /* __GDK_SEAT_DEFAULT_PRIVATE_H__ */ diff --git a/gdk/gdkseatprivate.h b/gdk/gdkseatprivate.h index 112465d9be..b5139df8ee 100644 --- a/gdk/gdkseatprivate.h +++ b/gdk/gdkseatprivate.h @@ -52,16 +52,16 @@ struct _GdkSeatClass gpointer prepare_func_data); void (* ungrab) (GdkSeat *seat); - GdkDevice * (* get_master) (GdkSeat *seat, - GdkSeatCapabilities capability); - GList * (* get_slaves) (GdkSeat *seat, - GdkSeatCapabilities capabilities); + GdkDevice * (* get_logical_device) (GdkSeat *seat, + GdkSeatCapabilities capability); + GList * (* get_physical_devices) (GdkSeat *seat, + GdkSeatCapabilities capabilities); GdkDeviceTool * (* get_tool) (GdkSeat *seat, guint64 serial, guint64 tool_id); - GList * (* get_master_pointers) (GdkSeat *seat, - GdkSeatCapabilities capabilities); + GList * (* get_logical_pointers) (GdkSeat *seat, + GdkSeatCapabilities capabilities); }; void gdk_seat_device_added (GdkSeat *seat, diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c index 9e5946794d..df2327951f 100644 --- a/gdk/gdksurface.c +++ b/gdk/gdksurface.c @@ -1762,7 +1762,7 @@ gdk_surface_hide (GdkSurface *surface) seat = gdk_display_get_default_seat (display); if (seat) { - devices = gdk_seat_get_slaves (seat, GDK_SEAT_CAPABILITY_ALL); + devices = gdk_seat_get_physical_devices (seat, GDK_SEAT_CAPABILITY_ALL); devices = g_list_prepend (devices, gdk_seat_get_keyboard (seat)); devices = g_list_prepend (devices, gdk_seat_get_pointer (seat)); } @@ -1880,7 +1880,7 @@ gdk_surface_set_cursor (GdkSurface *surface, device = gdk_seat_get_pointer (s->data); gdk_surface_set_cursor_internal (surface, device, surface->cursor); - devices = gdk_seat_get_slaves (s->data, GDK_SEAT_CAPABILITY_TABLET_STYLUS); + devices = gdk_seat_get_physical_devices (s->data, GDK_SEAT_CAPABILITY_TABLET_STYLUS); for (d = devices; d; d = d->next) { device = gdk_device_get_associated_device (d->data); @@ -1897,7 +1897,7 @@ gdk_surface_set_cursor (GdkSurface *surface, /** * gdk_surface_get_device_cursor: * @surface: a #GdkSurface. - * @device: a master, pointer #GdkDevice. + * @device: a logical, pointer #GdkDevice. * * Retrieves a #GdkCursor pointer for the @device currently set on the * specified #GdkSurface, or %NULL. If the return value is %NULL then @@ -1916,7 +1916,7 @@ gdk_surface_get_device_cursor (GdkSurface *surface, g_return_val_if_fail (GDK_IS_SURFACE (surface), NULL); g_return_val_if_fail (GDK_IS_DEVICE (device), NULL); g_return_val_if_fail (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD, NULL); - g_return_val_if_fail (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_MASTER, NULL); + g_return_val_if_fail (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_LOGICAL, NULL); return g_hash_table_lookup (surface->device_cursor, device); } @@ -1924,7 +1924,7 @@ gdk_surface_get_device_cursor (GdkSurface *surface, /** * gdk_surface_set_device_cursor: * @surface: a #GdkSurface - * @device: a master, pointer #GdkDevice + * @device: a logical, pointer #GdkDevice * @cursor: a #GdkCursor * * Sets a specific #GdkCursor for a given device when it gets inside @surface. @@ -1942,7 +1942,7 @@ gdk_surface_set_device_cursor (GdkSurface *surface, g_return_if_fail (GDK_IS_SURFACE (surface)); g_return_if_fail (GDK_IS_DEVICE (device)); g_return_if_fail (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD); - g_return_if_fail (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_MASTER); + g_return_if_fail (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_LOGICAL); if (!cursor) g_hash_table_remove (surface->device_cursor, device); @@ -2284,11 +2284,11 @@ _gdk_windowing_got_event (GdkDisplay *display, { pointer_info = _gdk_display_get_pointer_info (display, device); - if (source_device != pointer_info->last_slave && - gdk_device_get_device_type (source_device) == GDK_DEVICE_TYPE_SLAVE) - pointer_info->last_slave = source_device; - else if (pointer_info->last_slave) - source_device = pointer_info->last_slave; + if (source_device != pointer_info->last_physical_device && + gdk_device_get_device_type (source_device) == GDK_DEVICE_TYPE_PHYSICAL) + pointer_info->last_physical_device = source_device; + else if (pointer_info->last_physical_device) + source_device = pointer_info->last_physical_device; } _gdk_display_device_grab_update (display, device, source_device, serial); diff --git a/gdk/quartz/gdkdevicemanager-core-quartz.c b/gdk/quartz/gdkdevicemanager-core-quartz.c index de12acbc09..9e4620c693 100644 --- a/gdk/quartz/gdkdevicemanager-core-quartz.c +++ b/gdk/quartz/gdkdevicemanager-core-quartz.c @@ -54,7 +54,7 @@ create_core_pointer (GdkQuartzDeviceManagerCore *device_manager, { return g_object_new (GDK_TYPE_QUARTZ_DEVICE_CORE, "name", "Core Pointer", - "type", GDK_DEVICE_TYPE_MASTER, + "type", GDK_DEVICE_TYPE_LOGICAL, "input-source", GDK_SOURCE_MOUSE, "input-mode", GDK_MODE_SCREEN, "has-cursor", TRUE, @@ -69,7 +69,7 @@ create_core_keyboard (GdkQuartzDeviceManagerCore *device_manager, { return g_object_new (GDK_TYPE_QUARTZ_DEVICE_CORE, "name", "Core Keyboard", - "type", GDK_DEVICE_TYPE_MASTER, + "type", GDK_DEVICE_TYPE_LOGICAL, "input-source", GDK_SOURCE_KEYBOARD, "input-mode", GDK_MODE_SCREEN, "has-cursor", FALSE, @@ -112,8 +112,8 @@ gdk_quartz_device_manager_core_constructed (GObject *object) _gdk_device_set_associated_device (device_manager->core_pointer, device_manager->core_keyboard); _gdk_device_set_associated_device (device_manager->core_keyboard, device_manager->core_pointer); - seat = gdk_seat_default_new_for_master_pair (device_manager->core_pointer, - device_manager->core_keyboard); + seat = gdk_seat_default_new_for_logical_pair (device_manager->core_pointer, + device_manager->core_keyboard); gdk_display_add_seat (display, seat); g_object_unref (seat); } diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 4c6fb513ef..9916853adf 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -176,7 +176,7 @@ struct _GdkWaylandTabletData uint32_t vid; uint32_t pid; - GdkDevice *master; + GdkDevice *logical_device; GdkDevice *stylus_device; GdkDevice *eraser_device; GdkDevice *current_device; @@ -206,14 +206,14 @@ struct _GdkWaylandSeat GdkDisplay *display; - GdkDevice *master_pointer; - GdkDevice *master_keyboard; + GdkDevice *logical_pointer; + GdkDevice *logical_keyboard; GdkDevice *pointer; GdkDevice *wheel_scrolling; GdkDevice *finger_scrolling; GdkDevice *continuous_scrolling; GdkDevice *keyboard; - GdkDevice *touch_master; + GdkDevice *logical_touch; GdkDevice *touch; GdkCursor *cursor; GdkKeymap *keymap; @@ -265,7 +265,7 @@ G_DEFINE_TYPE (GdkWaylandSeat, gdk_wayland_seat, GDK_TYPE_SEAT) struct _GdkWaylandDevice { GdkDevice parent_instance; - GdkWaylandTouchData *emulating_touch; /* Only used on wd->touch_master */ + GdkWaylandTouchData *emulating_touch; /* Only used on wd->logical_touch */ GdkWaylandPointerData *pointer; }; @@ -289,7 +289,7 @@ struct _GdkWaylandDevicePadClass static void gdk_wayland_device_pad_iface_init (GdkDevicePadInterface *iface); static void init_pointer_data (GdkWaylandPointerData *pointer_data, GdkDisplay *display_wayland, - GdkDevice *master); + GdkDevice *logical_device); static void pointer_surface_update_scale (GdkDevice *device); #define GDK_TYPE_WAYLAND_DEVICE_PAD (gdk_wayland_device_pad_get_type ()) @@ -349,7 +349,7 @@ gdk_wayland_seat_find_tablet (GdkWaylandSeat *seat, { GdkWaylandTabletData *tablet = l->data; - if (tablet->master == device || + if (tablet->logical_device == device || tablet->stylus_device == device || tablet->eraser_device == device) return tablet; @@ -485,7 +485,7 @@ gdk_wayland_device_set_surface_cursor (GdkDevice *device, GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (gdk_device_get_seat (device)); GdkWaylandPointerData *pointer = GDK_WAYLAND_DEVICE (device)->pointer; - if (device == seat->touch_master) + if (device == seat->logical_touch) return; if (seat->grab_cursor) @@ -656,7 +656,7 @@ gdk_wayland_device_get_focus (GdkDevice *device) GdkWaylandSeat *wayland_seat = GDK_WAYLAND_SEAT (gdk_device_get_seat (device)); GdkWaylandPointerData *pointer; - if (device == wayland_seat->master_keyboard) + if (device == wayland_seat->logical_keyboard) return wayland_seat->keyboard_focus; else { @@ -1192,10 +1192,10 @@ data_device_enter (void *data, seat->pointer_info.surface_x = wl_fixed_to_double (x); seat->pointer_info.surface_y = wl_fixed_to_double (y); - if (seat->master_pointer) - device = seat->master_pointer; - else if (seat->touch_master) - device = seat->touch_master; + if (seat->logical_pointer) + device = seat->logical_pointer; + else if (seat->logical_touch) + device = seat->logical_touch; else { g_warning ("No device for DND enter, ignoring."); @@ -1347,11 +1347,11 @@ flush_discrete_scroll_event (GdkWaylandSeat *seat, source = get_scroll_device (seat, seat->pointer_info.frame.source); event = gdk_scroll_event_new_discrete (seat->pointer_info.focus, - seat->master_pointer, + seat->logical_pointer, source, NULL, seat->pointer_info.time, - device_get_modifiers (seat->master_pointer), + device_get_modifiers (seat->logical_pointer), direction, TRUE); @@ -1369,11 +1369,11 @@ flush_smooth_scroll_event (GdkWaylandSeat *seat, source = get_scroll_device (seat, seat->pointer_info.frame.source); event = gdk_scroll_event_new (seat->pointer_info.focus, - seat->master_pointer, + seat->logical_pointer, source, NULL, seat->pointer_info.time, - device_get_modifiers (seat->master_pointer), + device_get_modifiers (seat->logical_pointer), delta_x, delta_y, is_stop); @@ -1486,7 +1486,7 @@ pointer_handle_enter (void *data, event = gdk_crossing_event_new (GDK_ENTER_NOTIFY, seat->pointer_info.focus, - seat->master_pointer, + seat->logical_pointer, seat->pointer, 0, 0, @@ -1496,7 +1496,7 @@ pointer_handle_enter (void *data, GDK_NOTIFY_NONLINEAR); gdk_wayland_seat_set_frame_event (seat, event); - gdk_wayland_device_update_surface_cursor (seat->master_pointer); + gdk_wayland_device_update_surface_cursor (seat->logical_pointer); GDK_SEAT_NOTE (seat, EVENTS, g_message ("enter, seat %p surface %p", @@ -1532,17 +1532,17 @@ pointer_handle_leave (void *data, gulong display_serial; display_serial = _gdk_display_get_next_serial (seat->display); - _gdk_display_end_device_grab (seat->display, seat->master_pointer, + _gdk_display_end_device_grab (seat->display, seat->logical_pointer, display_serial, NULL, TRUE); _gdk_display_device_grab_update (seat->display, - seat->master_pointer, + seat->logical_pointer, seat->pointer, display_serial); } event = gdk_crossing_event_new (GDK_LEAVE_NOTIFY, seat->pointer_info.focus, - seat->master_pointer, + seat->logical_pointer, seat->pointer, 0, 0, @@ -1552,7 +1552,7 @@ pointer_handle_leave (void *data, GDK_NOTIFY_NONLINEAR); gdk_wayland_seat_set_frame_event (seat, event); - gdk_wayland_device_update_surface_cursor (seat->master_pointer); + gdk_wayland_device_update_surface_cursor (seat->logical_pointer); GDK_SEAT_NOTE (seat, EVENTS, g_message ("leave, seat %p surface %p", @@ -1586,11 +1586,11 @@ pointer_handle_motion (void *data, seat->pointer_info.surface_y = wl_fixed_to_double (sy); event = gdk_motion_event_new (seat->pointer_info.focus, - seat->master_pointer, + seat->logical_pointer, seat->pointer, NULL, time, - device_get_modifiers (seat->master_pointer), + device_get_modifiers (seat->logical_pointer), seat->pointer_info.surface_x, seat->pointer_info.surface_y, NULL); @@ -1650,11 +1650,11 @@ pointer_handle_button (void *data, event = gdk_button_event_new (state ? GDK_BUTTON_PRESS : GDK_BUTTON_RELEASE, seat->pointer_info.focus, - seat->master_pointer, + seat->logical_pointer, seat->pointer, NULL, time, - device_get_modifiers (seat->master_pointer), + device_get_modifiers (seat->logical_pointer), gdk_button, seat->pointer_info.surface_x, seat->pointer_info.surface_y, @@ -1877,17 +1877,17 @@ keyboard_handle_keymap (void *data, g_signal_emit_by_name (seat->keymap, "direction-changed"); if (direction != gdk_keymap_get_direction (seat->keymap)) - g_object_notify (G_OBJECT (seat->master_keyboard), "direction"); + g_object_notify (G_OBJECT (seat->logical_keyboard), "direction"); if (bidi != gdk_keymap_have_bidi_layouts (seat->keymap)) - g_object_notify (G_OBJECT (seat->master_keyboard), "has-bidi-layouts"); + g_object_notify (G_OBJECT (seat->logical_keyboard), "has-bidi-layouts"); if (caps_lock != gdk_keymap_get_caps_lock_state (seat->keymap)) - g_object_notify (G_OBJECT (seat->master_keyboard), "caps-lock-state"); + g_object_notify (G_OBJECT (seat->logical_keyboard), "caps-lock-state"); if (num_lock != gdk_keymap_get_num_lock_state (seat->keymap)) - g_object_notify (G_OBJECT (seat->master_keyboard), "num-lock-state"); + g_object_notify (G_OBJECT (seat->logical_keyboard), "num-lock-state"); if (scroll_lock != gdk_keymap_get_scroll_lock_state (seat->keymap)) - g_object_notify (G_OBJECT (seat->master_keyboard), "scroll-lock-state"); + g_object_notify (G_OBJECT (seat->logical_keyboard), "scroll-lock-state"); if (modifiers != gdk_keymap_get_modifier_state (seat->keymap)) - g_object_notify (G_OBJECT (seat->master_keyboard), "modifier-state"); + g_object_notify (G_OBJECT (seat->logical_keyboard), "modifier-state"); } static void @@ -1914,7 +1914,7 @@ keyboard_handle_enter (void *data, seat->repeat_key = 0; event = gdk_focus_event_new (seat->keyboard_focus, - seat->master_keyboard, + seat->logical_keyboard, seat->keyboard, TRUE); @@ -1949,7 +1949,7 @@ keyboard_handle_leave (void *data, _gdk_wayland_display_update_serial (display, serial); event = gdk_focus_event_new (seat->keyboard_focus, - seat->master_keyboard, + seat->logical_keyboard, seat->keyboard, FALSE); @@ -2076,11 +2076,11 @@ deliver_key_event (GdkWaylandSeat *seat, event = gdk_key_event_new (state ? GDK_KEY_PRESS : GDK_KEY_RELEASE, seat->keyboard_focus, - seat->master_keyboard, + seat->logical_keyboard, seat->keyboard, time_, key, - device_get_modifiers (seat->master_pointer), + device_get_modifiers (seat->logical_pointer), _gdk_wayland_keymap_key_is_modifier (keymap, key), &translated, &no_lock); @@ -2255,17 +2255,17 @@ keyboard_handle_modifiers (void *data, g_signal_emit_by_name (keymap, "direction-changed"); if (direction != gdk_keymap_get_direction (seat->keymap)) - g_object_notify (G_OBJECT (seat->master_keyboard), "direction"); + g_object_notify (G_OBJECT (seat->logical_keyboard), "direction"); if (bidi != gdk_keymap_have_bidi_layouts (seat->keymap)) - g_object_notify (G_OBJECT (seat->master_keyboard), "has-bidi-layouts"); + g_object_notify (G_OBJECT (seat->logical_keyboard), "has-bidi-layouts"); if (caps_lock != gdk_keymap_get_caps_lock_state (seat->keymap)) - g_object_notify (G_OBJECT (seat->master_keyboard), "caps-lock-state"); + g_object_notify (G_OBJECT (seat->logical_keyboard), "caps-lock-state"); if (num_lock != gdk_keymap_get_num_lock_state (seat->keymap)) - g_object_notify (G_OBJECT (seat->master_keyboard), "num-lock-state"); + g_object_notify (G_OBJECT (seat->logical_keyboard), "num-lock-state"); if (scroll_lock != gdk_keymap_get_scroll_lock_state (seat->keymap)) - g_object_notify (G_OBJECT (seat->master_keyboard), "scroll-lock-state"); + g_object_notify (G_OBJECT (seat->logical_keyboard), "scroll-lock-state"); if (modifiers != gdk_keymap_get_modifier_state (seat->keymap)) - g_object_notify (G_OBJECT (seat->master_keyboard), "modifier-state"); + g_object_notify (G_OBJECT (seat->logical_keyboard), "modifier-state"); } static void @@ -2342,13 +2342,13 @@ mimic_pointer_emulating_touch_info (GdkDevice *device, } static void -touch_handle_master_pointer_crossing (GdkWaylandSeat *seat, - GdkWaylandTouchData *touch, - uint32_t time) +touch_handle_logical_pointer_crossing (GdkWaylandSeat *seat, + GdkWaylandTouchData *touch, + uint32_t time) { GdkWaylandPointerData *pointer; - pointer = GDK_WAYLAND_DEVICE (seat->touch_master)->pointer; + pointer = GDK_WAYLAND_DEVICE (seat->logical_touch)->pointer; if (pointer->focus == touch->surface) return; @@ -2356,14 +2356,14 @@ touch_handle_master_pointer_crossing (GdkWaylandSeat *seat, if (pointer->focus) { emulate_touch_crossing (pointer->focus, NULL, - seat->touch_master, seat->touch, touch, + seat->logical_touch, seat->touch, touch, GDK_LEAVE_NOTIFY, GDK_CROSSING_NORMAL, time); } if (touch->surface) { emulate_touch_crossing (touch->surface, NULL, - seat->touch_master, seat->touch, touch, + seat->logical_touch, seat->touch, touch, GDK_ENTER_NOTIFY, GDK_CROSSING_NORMAL, time); } } @@ -2393,19 +2393,19 @@ touch_handle_down (void *data, event = gdk_touch_event_new (GDK_TOUCH_BEGIN, GDK_SLOT_TO_EVENT_SEQUENCE (touch->id), touch->surface, - seat->touch_master, + seat->logical_touch, seat->touch, time, - device_get_modifiers (seat->touch_master), + device_get_modifiers (seat->logical_touch), touch->x, touch->y, NULL, touch->initial_touch); if (touch->initial_touch) { - touch_handle_master_pointer_crossing (seat, touch, time); - GDK_WAYLAND_DEVICE(seat->touch_master)->emulating_touch = touch; - mimic_pointer_emulating_touch_info (seat->touch_master, touch); + touch_handle_logical_pointer_crossing (seat, touch, time); + GDK_WAYLAND_DEVICE(seat->logical_touch)->emulating_touch = touch; + mimic_pointer_emulating_touch_info (seat->logical_touch, touch); } if (GDK_DISPLAY_DEBUG_CHECK (gdk_seat_get_display (GDK_SEAT (seat)), EVENTS)) @@ -2436,10 +2436,10 @@ touch_handle_up (void *data, event = gdk_touch_event_new (GDK_TOUCH_END, GDK_SLOT_TO_EVENT_SEQUENCE (touch->id), touch->surface, - seat->touch_master, + seat->logical_touch, seat->touch, time, - device_get_modifiers (seat->touch_master), + device_get_modifiers (seat->logical_touch), touch->x, touch->y, NULL, touch->initial_touch); @@ -2454,7 +2454,7 @@ touch_handle_up (void *data, _gdk_wayland_display_deliver_event (seat->display, event); if (touch->initial_touch) - GDK_WAYLAND_DEVICE(seat->touch_master)->emulating_touch = NULL; + GDK_WAYLAND_DEVICE(seat->logical_touch)->emulating_touch = NULL; gdk_wayland_seat_remove_touch (seat, id); } @@ -2476,15 +2476,15 @@ touch_handle_motion (void *data, touch->y = wl_fixed_to_double (y); if (touch->initial_touch) - mimic_pointer_emulating_touch_info (seat->touch_master, touch); + mimic_pointer_emulating_touch_info (seat->logical_touch, touch); event = gdk_touch_event_new (GDK_TOUCH_UPDATE, GDK_SLOT_TO_EVENT_SEQUENCE (touch->id), touch->surface, - seat->touch_master, + seat->logical_touch, seat->touch, time, - device_get_modifiers (seat->touch_master), + device_get_modifiers (seat->logical_touch), touch->x, touch->y, NULL, touch->initial_touch); @@ -2514,10 +2514,10 @@ touch_handle_cancel (void *data, GHashTableIter iter; GdkEvent *event; - if (GDK_WAYLAND_DEVICE (seat->touch_master)->emulating_touch) + if (GDK_WAYLAND_DEVICE (seat->logical_touch)->emulating_touch) { - touch = GDK_WAYLAND_DEVICE (seat->touch_master)->emulating_touch; - GDK_WAYLAND_DEVICE (seat->touch_master)->emulating_touch = NULL; + touch = GDK_WAYLAND_DEVICE (seat->logical_touch)->emulating_touch; + GDK_WAYLAND_DEVICE (seat->logical_touch)->emulating_touch = NULL; } g_hash_table_iter_init (&iter, seat->touches); @@ -2527,10 +2527,10 @@ touch_handle_cancel (void *data, event = gdk_touch_event_new (GDK_TOUCH_CANCEL, GDK_SLOT_TO_EVENT_SEQUENCE (touch->id), touch->surface, - seat->touch_master, + seat->logical_touch, seat->touch, GDK_CURRENT_TIME, - device_get_modifiers (seat->touch_master), + device_get_modifiers (seat->logical_touch), touch->x, touch->y, NULL, touch->initial_touch); @@ -2557,10 +2557,10 @@ emit_gesture_swipe_event (GdkWaylandSeat *seat, seat->pointer_info.time = _time; event = gdk_touchpad_event_new_swipe (seat->pointer_info.focus, - seat->master_pointer, + seat->logical_pointer, seat->pointer, _time, - device_get_modifiers (seat->master_pointer), + device_get_modifiers (seat->logical_pointer), phase, seat->pointer_info.surface_x, seat->pointer_info.surface_y, @@ -2654,10 +2654,10 @@ emit_gesture_pinch_event (GdkWaylandSeat *seat, seat->pointer_info.time = _time; event = gdk_touchpad_event_new_pinch (seat->pointer_info.focus, - seat->master_pointer, + seat->logical_pointer, seat->pointer, _time, - device_get_modifiers (seat->master_pointer), + device_get_modifiers (seat->logical_pointer), phase, seat->pointer_info.surface_x, seat->pointer_info.surface_y, @@ -2773,7 +2773,7 @@ _gdk_wayland_seat_remove_tablet (GdkWaylandSeat *seat, gdk_seat_device_removed (GDK_SEAT (seat), tablet->stylus_device); gdk_seat_device_removed (GDK_SEAT (seat), tablet->eraser_device); - gdk_seat_device_removed (GDK_SEAT (seat), tablet->master); + gdk_seat_device_removed (GDK_SEAT (seat), tablet->logical_device); while (tablet->pads) { @@ -2785,7 +2785,7 @@ _gdk_wayland_seat_remove_tablet (GdkWaylandSeat *seat, zwp_tablet_v2_destroy (tablet->wp_tablet); - _gdk_device_set_associated_device (tablet->master, NULL); + _gdk_device_set_associated_device (tablet->logical_device, NULL); _gdk_device_set_associated_device (tablet->stylus_device, NULL); _gdk_device_set_associated_device (tablet->eraser_device, NULL); @@ -2796,7 +2796,7 @@ _gdk_wayland_seat_remove_tablet (GdkWaylandSeat *seat, g_free (tablet->axes); wl_surface_destroy (tablet->pointer_info.pointer_surface); - g_object_unref (tablet->master); + g_object_unref (tablet->logical_device); g_object_unref (tablet->stylus_device); g_object_unref (tablet->eraser_device); g_free (tablet); @@ -2872,29 +2872,29 @@ tablet_handle_done (void *data, GdkWaylandTabletData *tablet = data; GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (tablet->seat); GdkDisplay *display = gdk_seat_get_display (GDK_SEAT (seat)); - GdkDevice *master, *stylus_device, *eraser_device; - gchar *master_name, *eraser_name; + GdkDevice *logical_device, *stylus_device, *eraser_device; + gchar *logical_name, *eraser_name; gchar *vid, *pid; vid = g_strdup_printf ("%.4x", tablet->vid); pid = g_strdup_printf ("%.4x", tablet->pid); - master_name = g_strdup_printf ("Master pointer for %s", tablet->name); - master = g_object_new (GDK_TYPE_WAYLAND_DEVICE, - "name", master_name, - "type", GDK_DEVICE_TYPE_MASTER, - "source", GDK_SOURCE_MOUSE, - "has-cursor", TRUE, - "display", display, - "seat", seat, - NULL); - GDK_WAYLAND_DEVICE (master)->pointer = &tablet->pointer_info; + logical_name = g_strdup_printf ("Logical pointer for %s", tablet->name); + logical_device = g_object_new (GDK_TYPE_WAYLAND_DEVICE, + "name", logical_name, + "type", GDK_DEVICE_TYPE_LOGICAL, + "source", GDK_SOURCE_MOUSE, + "has-cursor", TRUE, + "display", display, + "seat", seat, + NULL); + GDK_WAYLAND_DEVICE (logical_device)->pointer = &tablet->pointer_info; eraser_name = g_strconcat (tablet->name, " (Eraser)", NULL); stylus_device = g_object_new (GDK_TYPE_WAYLAND_DEVICE, "name", tablet->name, - "type", GDK_DEVICE_TYPE_SLAVE, + "type", GDK_DEVICE_TYPE_PHYSICAL, "source", GDK_SOURCE_PEN, "has-cursor", FALSE, "display", display, @@ -2905,7 +2905,7 @@ tablet_handle_done (void *data, eraser_device = g_object_new (GDK_TYPE_WAYLAND_DEVICE, "name", eraser_name, - "type", GDK_DEVICE_TYPE_SLAVE, + "type", GDK_DEVICE_TYPE_PHYSICAL, "source", GDK_SOURCE_ERASER, "has-cursor", FALSE, "display", display, @@ -2914,22 +2914,22 @@ tablet_handle_done (void *data, "product-id", pid, NULL); - tablet->master = master; - init_pointer_data (&tablet->pointer_info, display, tablet->master); + tablet->logical_device = logical_device; + init_pointer_data (&tablet->pointer_info, display, tablet->logical_device); tablet->stylus_device = stylus_device; tablet->eraser_device = eraser_device; - _gdk_device_set_associated_device (master, seat->master_keyboard); - _gdk_device_set_associated_device (stylus_device, master); - _gdk_device_set_associated_device (eraser_device, master); + _gdk_device_set_associated_device (logical_device, seat->logical_keyboard); + _gdk_device_set_associated_device (stylus_device, logical_device); + _gdk_device_set_associated_device (eraser_device, logical_device); - gdk_seat_device_added (GDK_SEAT (seat), master); + gdk_seat_device_added (GDK_SEAT (seat), logical_device); gdk_seat_device_added (GDK_SEAT (seat), stylus_device); gdk_seat_device_added (GDK_SEAT (seat), eraser_device); g_free (eraser_name); - g_free (master_name); + g_free (logical_name); g_free (vid); g_free (pid); } @@ -3014,13 +3014,13 @@ seat_handle_capabilities (void *data, seat->pointer = g_object_new (GDK_TYPE_WAYLAND_DEVICE, "name", "Wayland Pointer", - "type", GDK_DEVICE_TYPE_SLAVE, + "type", GDK_DEVICE_TYPE_PHYSICAL, "source", GDK_SOURCE_MOUSE, "has-cursor", TRUE, "display", seat->display, "seat", seat, NULL); - _gdk_device_set_associated_device (seat->pointer, seat->master_pointer); + _gdk_device_set_associated_device (seat->pointer, seat->logical_pointer); gdk_seat_device_added (GDK_SEAT (seat), seat->pointer); if (display_wayland->pointer_gestures) @@ -3084,14 +3084,14 @@ seat_handle_capabilities (void *data, seat->keyboard = g_object_new (GDK_TYPE_WAYLAND_DEVICE, "name", "Wayland Keyboard", - "type", GDK_DEVICE_TYPE_SLAVE, + "type", GDK_DEVICE_TYPE_PHYSICAL, "source", GDK_SOURCE_KEYBOARD, "has-cursor", FALSE, "display", seat->display, "seat", seat, NULL); _gdk_device_reset_axes (seat->keyboard); - _gdk_device_set_associated_device (seat->keyboard, seat->master_keyboard); + _gdk_device_set_associated_device (seat->keyboard, seat->logical_keyboard); gdk_seat_device_added (GDK_SEAT (seat), seat->keyboard); } else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && seat->wl_keyboard) @@ -3110,27 +3110,27 @@ seat_handle_capabilities (void *data, wl_touch_set_user_data (seat->wl_touch, seat); wl_touch_add_listener (seat->wl_touch, &touch_listener, seat); - seat->touch_master = g_object_new (GDK_TYPE_WAYLAND_DEVICE, - "name", "Wayland Touch Master Pointer", - "type", GDK_DEVICE_TYPE_MASTER, + seat->logical_touch = g_object_new (GDK_TYPE_WAYLAND_DEVICE, + "name", "Wayland Touch Logical Pointer", + "type", GDK_DEVICE_TYPE_LOGICAL, "source", GDK_SOURCE_MOUSE, "has-cursor", TRUE, "display", seat->display, "seat", seat, NULL); - GDK_WAYLAND_DEVICE (seat->touch_master)->pointer = &seat->touch_info; - _gdk_device_set_associated_device (seat->touch_master, seat->master_keyboard); - gdk_seat_device_added (GDK_SEAT (seat), seat->touch_master); + GDK_WAYLAND_DEVICE (seat->logical_touch)->pointer = &seat->touch_info; + _gdk_device_set_associated_device (seat->logical_touch, seat->logical_keyboard); + gdk_seat_device_added (GDK_SEAT (seat), seat->logical_touch); seat->touch = g_object_new (GDK_TYPE_WAYLAND_DEVICE, "name", "Wayland Touch", - "type", GDK_DEVICE_TYPE_SLAVE, + "type", GDK_DEVICE_TYPE_PHYSICAL, "source", GDK_SOURCE_TOUCHSCREEN, "has-cursor", FALSE, "display", seat->display, "seat", seat, NULL); - _gdk_device_set_associated_device (seat->touch, seat->touch_master); + _gdk_device_set_associated_device (seat->touch, seat->logical_touch); gdk_seat_device_added (GDK_SEAT (seat), seat->touch); } else if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && seat->wl_touch) @@ -3138,11 +3138,11 @@ seat_handle_capabilities (void *data, wl_touch_release (seat->wl_touch); seat->wl_touch = NULL; gdk_seat_device_removed (GDK_SEAT (seat), seat->touch); - gdk_seat_device_removed (GDK_SEAT (seat), seat->touch_master); - _gdk_device_set_associated_device (seat->touch_master, NULL); + gdk_seat_device_removed (GDK_SEAT (seat), seat->logical_touch); + _gdk_device_set_associated_device (seat->logical_touch, NULL); _gdk_device_set_associated_device (seat->touch, NULL); - g_clear_object (&seat->touch_master); + g_clear_object (&seat->logical_touch); g_clear_object (&seat->touch); } } @@ -3161,13 +3161,13 @@ get_scroll_device (GdkWaylandSeat *seat, { seat->wheel_scrolling = g_object_new (GDK_TYPE_WAYLAND_DEVICE, "name", "Wayland Wheel Scrolling", - "type", GDK_DEVICE_TYPE_SLAVE, + "type", GDK_DEVICE_TYPE_PHYSICAL, "source", GDK_SOURCE_MOUSE, "has-cursor", TRUE, "display", seat->display, "seat", seat, NULL); - _gdk_device_set_associated_device (seat->wheel_scrolling, seat->master_pointer); + _gdk_device_set_associated_device (seat->wheel_scrolling, seat->logical_pointer); gdk_seat_device_added (GDK_SEAT (seat), seat->wheel_scrolling); } return seat->wheel_scrolling; @@ -3177,13 +3177,13 @@ get_scroll_device (GdkWaylandSeat *seat, { seat->finger_scrolling = g_object_new (GDK_TYPE_WAYLAND_DEVICE, "name", "Wayland Finger Scrolling", - "type", GDK_DEVICE_TYPE_SLAVE, + "type", GDK_DEVICE_TYPE_PHYSICAL, "source", GDK_SOURCE_TOUCHPAD, "has-cursor", TRUE, "display", seat->display, "seat", seat, NULL); - _gdk_device_set_associated_device (seat->finger_scrolling, seat->master_pointer); + _gdk_device_set_associated_device (seat->finger_scrolling, seat->logical_pointer); gdk_seat_device_added (GDK_SEAT (seat), seat->finger_scrolling); } return seat->finger_scrolling; @@ -3193,13 +3193,13 @@ get_scroll_device (GdkWaylandSeat *seat, { seat->continuous_scrolling = g_object_new (GDK_TYPE_WAYLAND_DEVICE, "name", "Wayland Continuous Scrolling", - "type", GDK_DEVICE_TYPE_SLAVE, + "type", GDK_DEVICE_TYPE_PHYSICAL, "source", GDK_SOURCE_TRACKPOINT, "has-cursor", TRUE, "display", seat->display, "seat", seat, NULL); - _gdk_device_set_associated_device (seat->continuous_scrolling, seat->master_pointer); + _gdk_device_set_associated_device (seat->continuous_scrolling, seat->logical_pointer); gdk_seat_device_added (GDK_SEAT (seat), seat->continuous_scrolling); } return seat->continuous_scrolling; @@ -3352,7 +3352,7 @@ gdk_wayland_tablet_flush_frame_event (GdkWaylandTabletData *tablet, if (type == GDK_PROXIMITY_OUT) emulate_crossing (gdk_event_get_surface (event), NULL, - tablet->master, GDK_LEAVE_NOTIFY, + tablet->logical_device, GDK_LEAVE_NOTIFY, GDK_CROSSING_NORMAL, time); _gdk_wayland_display_deliver_event (gdk_seat_get_display (tablet->seat), @@ -3360,7 +3360,7 @@ gdk_wayland_tablet_flush_frame_event (GdkWaylandTabletData *tablet, if (type == GDK_PROXIMITY_IN) emulate_crossing (gdk_event_get_surface (event), NULL, - tablet->master, GDK_ENTER_NOTIFY, + tablet->logical_device, GDK_ENTER_NOTIFY, GDK_CROSSING_NORMAL, time); gdk_event_unref (event); @@ -3436,27 +3436,27 @@ gdk_wayland_device_tablet_clone_tool_axes (GdkWaylandTabletData *tablet, } static void -gdk_wayland_mimic_device_axes (GdkDevice *master, - GdkDevice *slave) +gdk_wayland_mimic_device_axes (GdkDevice *logical, + GdkDevice *physical) { gdouble axis_min, axis_max, axis_resolution; GdkAxisUse axis_use; gint axis_count; gint i; - g_object_freeze_notify (G_OBJECT (master)); - _gdk_device_reset_axes (master); - axis_count = gdk_device_get_n_axes (slave); + g_object_freeze_notify (G_OBJECT (logical)); + _gdk_device_reset_axes (logical); + axis_count = gdk_device_get_n_axes (physical); for (i = 0; i < axis_count; i++) { - _gdk_device_get_axis_info (slave, i, &axis_use, &axis_min, + _gdk_device_get_axis_info (physical, i, &axis_use, &axis_min, &axis_max, &axis_resolution); - _gdk_device_add_axis (master, axis_use, axis_min, + _gdk_device_add_axis (logical, axis_use, axis_min, axis_max, axis_resolution); } - g_object_thaw_notify (G_OBJECT (master)); + g_object_thaw_notify (G_OBJECT (logical)); } static void @@ -3489,11 +3489,11 @@ tablet_tool_handle_proximity_in (void *data, gdk_device_update_tool (tablet->current_device, tool->tool); gdk_wayland_device_tablet_clone_tool_axes (tablet, tool->tool); - gdk_wayland_mimic_device_axes (tablet->master, tablet->current_device); + gdk_wayland_mimic_device_axes (tablet->logical_device, tablet->current_device); event = gdk_proximity_event_new (GDK_PROXIMITY_IN, tablet->pointer_info.focus, - tablet->master, + tablet->logical_device, tablet->current_device, tool->tool, tablet->pointer_info.time); @@ -3502,7 +3502,7 @@ tablet_tool_handle_proximity_in (void *data, tablet->pointer_info.pointer_surface_outputs = g_slist_append (tablet->pointer_info.pointer_surface_outputs, gdk_wayland_surface_get_wl_output (surface)); - pointer_surface_update_scale (tablet->master); + pointer_surface_update_scale (tablet->logical_device); GDK_SEAT_NOTE (seat, EVENTS, g_message ("proximity in, seat %p surface %p tool %d", @@ -3524,7 +3524,7 @@ tablet_tool_handle_proximity_out (void *data, event = gdk_proximity_event_new (GDK_PROXIMITY_OUT, tablet->pointer_info.focus, - tablet->master, + tablet->logical_device, tablet->current_device, tool->tool, tablet->pointer_info.time); @@ -3535,7 +3535,7 @@ tablet_tool_handle_proximity_out (void *data, tablet->pointer_info.pointer_surface_outputs = g_slist_remove (tablet->pointer_info.pointer_surface_outputs, gdk_wayland_surface_get_wl_output (tablet->pointer_info.focus)); - pointer_surface_update_scale (tablet->master); + pointer_surface_update_scale (tablet->logical_device); g_object_unref (tablet->pointer_info.focus); tablet->pointer_info.focus = NULL; @@ -3561,11 +3561,11 @@ tablet_create_button_event_frame (GdkWaylandTabletData *tablet, event = gdk_button_event_new (evtype, tablet->pointer_info.focus, - tablet->master, + tablet->logical_device, tablet->current_device, tablet->current_tool->tool, tablet->pointer_info.time, - device_get_modifiers (seat->master_pointer), + device_get_modifiers (seat->logical_pointer), button, tablet->pointer_info.surface_x, tablet->pointer_info.surface_y, @@ -3626,11 +3626,11 @@ tablet_tool_handle_motion (void *data, tablet->pointer_info.surface_y)); event = gdk_motion_event_new (tablet->pointer_info.focus, - tablet->master, + tablet->logical_device, tablet->current_device, tool->tool, tablet->pointer_info.time, - device_get_modifiers (tablet->master), + device_get_modifiers (tablet->logical_device), tablet->pointer_info.surface_x, tablet->pointer_info.surface_y, tablet_copy_axes (tablet)); @@ -3788,11 +3788,11 @@ tablet_tool_handle_wheel (void *data, /* Send smooth event */ event = gdk_scroll_event_new (tablet->pointer_info.focus, - tablet->master, + tablet->logical_device, tablet->current_device, tablet->current_tool->tool, tablet->pointer_info.time, - device_get_modifiers (tablet->master), + device_get_modifiers (tablet->logical_device), 0, clicks, FALSE); @@ -3800,11 +3800,11 @@ tablet_tool_handle_wheel (void *data, /* Send discrete event */ event = gdk_scroll_event_new_discrete (tablet->pointer_info.focus, - tablet->master, + tablet->logical_device, tablet->current_device, tablet->current_tool->tool, tablet->pointer_info.time, - device_get_modifiers (tablet->master), + device_get_modifiers (tablet->logical_device), clicks > 0 ? GDK_SCROLL_DOWN : GDK_SCROLL_UP, TRUE); @@ -4193,13 +4193,13 @@ tablet_pad_handle_done (void *data, pad->device = g_object_new (GDK_TYPE_WAYLAND_DEVICE_PAD, "name", "Pad device", - "type", GDK_DEVICE_TYPE_SLAVE, + "type", GDK_DEVICE_TYPE_PHYSICAL, "source", GDK_SOURCE_TABLET_PAD, "display", gdk_seat_get_display (pad->seat), "seat", pad->seat, NULL); - _gdk_device_set_associated_device (pad->device, GDK_WAYLAND_SEAT (pad->seat)->master_keyboard); + _gdk_device_set_associated_device (pad->device, GDK_WAYLAND_SEAT (pad->seat)->logical_keyboard); gdk_seat_device_added (GDK_SEAT (pad->seat), pad->device); } @@ -4370,34 +4370,34 @@ static void init_devices (GdkWaylandSeat *seat) { /* pointer */ - seat->master_pointer = g_object_new (GDK_TYPE_WAYLAND_DEVICE, + seat->logical_pointer = g_object_new (GDK_TYPE_WAYLAND_DEVICE, "name", "Core Pointer", - "type", GDK_DEVICE_TYPE_MASTER, + "type", GDK_DEVICE_TYPE_LOGICAL, "source", GDK_SOURCE_MOUSE, "has-cursor", TRUE, "display", seat->display, "seat", seat, NULL); - GDK_WAYLAND_DEVICE (seat->master_pointer)->pointer = &seat->pointer_info; + GDK_WAYLAND_DEVICE (seat->logical_pointer)->pointer = &seat->pointer_info; /* keyboard */ - seat->master_keyboard = g_object_new (GDK_TYPE_WAYLAND_DEVICE, + seat->logical_keyboard = g_object_new (GDK_TYPE_WAYLAND_DEVICE, "name", "Core Keyboard", - "type", GDK_DEVICE_TYPE_MASTER, + "type", GDK_DEVICE_TYPE_LOGICAL, "source", GDK_SOURCE_KEYBOARD, "has-cursor", FALSE, "display", seat->display, "seat", seat, NULL); - _gdk_device_reset_axes (seat->master_keyboard); + _gdk_device_reset_axes (seat->logical_keyboard); /* link both */ - _gdk_device_set_associated_device (seat->master_pointer, seat->master_keyboard); - _gdk_device_set_associated_device (seat->master_keyboard, seat->master_pointer); + _gdk_device_set_associated_device (seat->logical_pointer, seat->logical_keyboard); + _gdk_device_set_associated_device (seat->logical_keyboard, seat->logical_pointer); - gdk_seat_device_added (GDK_SEAT (seat), seat->master_pointer); - gdk_seat_device_added (GDK_SEAT (seat), seat->master_keyboard); + gdk_seat_device_added (GDK_SEAT (seat), seat->logical_pointer); + gdk_seat_device_added (GDK_SEAT (seat), seat->logical_keyboard); } static void @@ -4432,12 +4432,12 @@ gdk_wayland_seat_update_cursor_scale (GdkWaylandSeat *seat) { GList *l; - pointer_surface_update_scale (seat->master_pointer); + pointer_surface_update_scale (seat->logical_pointer); for (l = seat->tablets; l; l = l->next) { GdkWaylandTabletData *tablet = l->data; - pointer_surface_update_scale (tablet->master); + pointer_surface_update_scale (tablet->logical_device); } } @@ -4550,11 +4550,11 @@ gdk_wayland_seat_get_capabilities (GdkSeat *seat) GdkWaylandSeat *wayland_seat = GDK_WAYLAND_SEAT (seat); GdkSeatCapabilities caps = 0; - if (wayland_seat->master_pointer) + if (wayland_seat->logical_pointer) caps |= GDK_SEAT_CAPABILITY_POINTER; - if (wayland_seat->master_keyboard) + if (wayland_seat->logical_keyboard) caps |= GDK_SEAT_CAPABILITY_KEYBOARD; - if (wayland_seat->touch_master) + if (wayland_seat->logical_touch) caps |= GDK_SEAT_CAPABILITY_TOUCH; return caps; @@ -4611,14 +4611,14 @@ gdk_wayland_seat_grab (GdkSeat *seat, return GDK_GRAB_NOT_VIEWABLE; } - if (wayland_seat->master_pointer && + if (wayland_seat->logical_pointer && capabilities & GDK_SEAT_CAPABILITY_POINTER) { - device_maybe_emit_grab_crossing (wayland_seat->master_pointer, + device_maybe_emit_grab_crossing (wayland_seat->logical_pointer, surface, evtime); _gdk_display_add_device_grab (display, - wayland_seat->master_pointer, + wayland_seat->logical_pointer, surface, GDK_OWNERSHIP_NONE, owner_events, @@ -4629,17 +4629,17 @@ gdk_wayland_seat_grab (GdkSeat *seat, gdk_wayland_seat_set_global_cursor (seat, cursor); g_set_object (&wayland_seat->cursor, cursor); - gdk_wayland_device_update_surface_cursor (wayland_seat->master_pointer); + gdk_wayland_device_update_surface_cursor (wayland_seat->logical_pointer); } - if (wayland_seat->touch_master && + if (wayland_seat->logical_touch && capabilities & GDK_SEAT_CAPABILITY_TOUCH) { - device_maybe_emit_grab_crossing (wayland_seat->touch_master, + device_maybe_emit_grab_crossing (wayland_seat->logical_touch, surface, evtime); _gdk_display_add_device_grab (display, - wayland_seat->touch_master, + wayland_seat->logical_touch, surface, GDK_OWNERSHIP_NONE, owner_events, @@ -4649,14 +4649,14 @@ gdk_wayland_seat_grab (GdkSeat *seat, FALSE); } - if (wayland_seat->master_keyboard && + if (wayland_seat->logical_keyboard && capabilities & GDK_SEAT_CAPABILITY_KEYBOARD) { - device_maybe_emit_grab_crossing (wayland_seat->master_keyboard, + device_maybe_emit_grab_crossing (wayland_seat->logical_keyboard, surface, evtime); _gdk_display_add_device_grab (display, - wayland_seat->master_keyboard, + wayland_seat->logical_keyboard, surface, GDK_OWNERSHIP_NONE, owner_events, @@ -4677,11 +4677,12 @@ gdk_wayland_seat_grab (GdkSeat *seat, { GdkWaylandTabletData *tablet = l->data; - device_maybe_emit_grab_crossing (tablet->master, - surface, evtime); + device_maybe_emit_grab_crossing (tablet->logical_device, + surface, + evtime); _gdk_display_add_device_grab (display, - tablet->master, + tablet->logical_device, surface, GDK_OWNERSHIP_NONE, owner_events, @@ -4690,7 +4691,7 @@ gdk_wayland_seat_grab (GdkSeat *seat, evtime, FALSE); - gdk_wayland_device_update_surface_cursor (tablet->master); + gdk_wayland_device_update_surface_cursor (tablet->logical_device); } } @@ -4709,27 +4710,27 @@ gdk_wayland_seat_ungrab (GdkSeat *seat) gdk_wayland_seat_set_grab_surface (wayland_seat, NULL); - if (wayland_seat->master_pointer) + if (wayland_seat->logical_pointer) { - device_maybe_emit_ungrab_crossing (wayland_seat->master_pointer, + device_maybe_emit_ungrab_crossing (wayland_seat->logical_pointer, GDK_CURRENT_TIME); - gdk_wayland_device_update_surface_cursor (wayland_seat->master_pointer); + gdk_wayland_device_update_surface_cursor (wayland_seat->logical_pointer); } - if (wayland_seat->master_keyboard) + if (wayland_seat->logical_keyboard) { GdkSurface *prev_focus; - prev_focus = device_maybe_emit_ungrab_crossing (wayland_seat->master_keyboard, + prev_focus = device_maybe_emit_ungrab_crossing (wayland_seat->logical_keyboard, GDK_CURRENT_TIME); if (prev_focus) gdk_wayland_surface_restore_shortcuts (prev_focus, seat); } - if (wayland_seat->touch_master) + if (wayland_seat->logical_touch) { - grab = _gdk_display_get_last_device_grab (display, wayland_seat->touch_master); + grab = _gdk_display_get_last_device_grab (display, wayland_seat->logical_touch); if (grab) grab->serial_end = grab->serial_start; @@ -4739,7 +4740,7 @@ gdk_wayland_seat_ungrab (GdkSeat *seat) { GdkWaylandTabletData *tablet = l->data; - grab = _gdk_display_get_last_device_grab (display, tablet->master); + grab = _gdk_display_get_last_device_grab (display, tablet->logical_device); if (grab) grab->serial_end = grab->serial_start; @@ -4747,40 +4748,40 @@ gdk_wayland_seat_ungrab (GdkSeat *seat) } static GdkDevice * -gdk_wayland_seat_get_master (GdkSeat *seat, - GdkSeatCapabilities capabilities) +gdk_wayland_seat_get_logical_device (GdkSeat *seat, + GdkSeatCapabilities capabilities) { GdkWaylandSeat *wayland_seat = GDK_WAYLAND_SEAT (seat); if (capabilities == GDK_SEAT_CAPABILITY_POINTER) - return wayland_seat->master_pointer; + return wayland_seat->logical_pointer; else if (capabilities == GDK_SEAT_CAPABILITY_KEYBOARD) - return wayland_seat->master_keyboard; + return wayland_seat->logical_keyboard; else if (capabilities == GDK_SEAT_CAPABILITY_TOUCH) - return wayland_seat->touch_master; + return wayland_seat->logical_touch; return NULL; } static GList * -gdk_wayland_seat_get_slaves (GdkSeat *seat, - GdkSeatCapabilities capabilities) +gdk_wayland_seat_get_physical_devices (GdkSeat *seat, + GdkSeatCapabilities capabilities) { GdkWaylandSeat *wayland_seat = GDK_WAYLAND_SEAT (seat); - GList *slaves = NULL; + GList *physical_devices = NULL; if (wayland_seat->finger_scrolling && (capabilities & GDK_SEAT_CAPABILITY_POINTER)) - slaves = g_list_prepend (slaves, wayland_seat->finger_scrolling); + physical_devices = g_list_prepend (physical_devices, wayland_seat->finger_scrolling); if (wayland_seat->continuous_scrolling && (capabilities & GDK_SEAT_CAPABILITY_POINTER)) - slaves = g_list_prepend (slaves, wayland_seat->continuous_scrolling); + physical_devices = g_list_prepend (physical_devices, wayland_seat->continuous_scrolling); if (wayland_seat->wheel_scrolling && (capabilities & GDK_SEAT_CAPABILITY_POINTER)) - slaves = g_list_prepend (slaves, wayland_seat->wheel_scrolling); + physical_devices = g_list_prepend (physical_devices, wayland_seat->wheel_scrolling); if (wayland_seat->pointer && (capabilities & GDK_SEAT_CAPABILITY_POINTER)) - slaves = g_list_prepend (slaves, wayland_seat->pointer); + physical_devices = g_list_prepend (physical_devices, wayland_seat->pointer); if (wayland_seat->keyboard && (capabilities & GDK_SEAT_CAPABILITY_KEYBOARD)) - slaves = g_list_prepend (slaves, wayland_seat->keyboard); + physical_devices = g_list_prepend (physical_devices, wayland_seat->keyboard); if (wayland_seat->touch && (capabilities & GDK_SEAT_CAPABILITY_TOUCH)) - slaves = g_list_prepend (slaves, wayland_seat->touch); + physical_devices = g_list_prepend (physical_devices, wayland_seat->touch); if (wayland_seat->tablets && (capabilities & GDK_SEAT_CAPABILITY_TABLET_STYLUS)) { @@ -4790,8 +4791,8 @@ gdk_wayland_seat_get_slaves (GdkSeat *seat, { GdkWaylandTabletData *tablet = l->data; - slaves = g_list_prepend (slaves, tablet->stylus_device); - slaves = g_list_prepend (slaves, tablet->eraser_device); + physical_devices = g_list_prepend (physical_devices, tablet->stylus_device); + physical_devices = g_list_prepend (physical_devices, tablet->eraser_device); } } @@ -4802,24 +4803,24 @@ gdk_wayland_seat_get_slaves (GdkSeat *seat, for (l = wayland_seat->tablet_pads; l; l = l->next) { GdkWaylandTabletPadData *data = l->data; - slaves = g_list_prepend (slaves, data->device); + physical_devices = g_list_prepend (physical_devices, data->device); } } - return slaves; + return physical_devices; } static GList * -gdk_wayland_seat_get_master_pointers (GdkSeat *seat, - GdkSeatCapabilities capabilities) +gdk_wayland_seat_get_logical_pointers (GdkSeat *seat, + GdkSeatCapabilities capabilities) { GdkWaylandSeat *wayland_seat = GDK_WAYLAND_SEAT (seat); - GList *masters = NULL; + GList *logical_devices = NULL; if (capabilities & GDK_SEAT_CAPABILITY_POINTER) - masters = g_list_prepend (masters, wayland_seat->master_pointer); + logical_devices = g_list_prepend (logical_devices, wayland_seat->logical_pointer); if (capabilities & GDK_SEAT_CAPABILITY_TOUCH) - masters = g_list_prepend (masters, wayland_seat->touch_master); + logical_devices = g_list_prepend (logical_devices, wayland_seat->logical_touch); if (capabilities & GDK_SEAT_CAPABILITY_TABLET_STYLUS) { GList *l; @@ -4828,11 +4829,11 @@ gdk_wayland_seat_get_master_pointers (GdkSeat *seat, { GdkWaylandTabletData *tablet = l->data; - masters = g_list_prepend (masters, tablet->master); + logical_devices = g_list_prepend (logical_devices, tablet->logical_device); } } - return masters; + return logical_devices; } static void @@ -4846,9 +4847,9 @@ gdk_wayland_seat_class_init (GdkWaylandSeatClass *klass) seat_class->get_capabilities = gdk_wayland_seat_get_capabilities; seat_class->grab = gdk_wayland_seat_grab; seat_class->ungrab = gdk_wayland_seat_ungrab; - seat_class->get_master = gdk_wayland_seat_get_master; - seat_class->get_slaves = gdk_wayland_seat_get_slaves; - seat_class->get_master_pointers = gdk_wayland_seat_get_master_pointers; + seat_class->get_logical_device = gdk_wayland_seat_get_logical_device; + seat_class->get_physical_devices = gdk_wayland_seat_get_physical_devices; + seat_class->get_logical_pointers = gdk_wayland_seat_get_logical_pointers; } static void @@ -4859,7 +4860,7 @@ gdk_wayland_seat_init (GdkWaylandSeat *seat) static void init_pointer_data (GdkWaylandPointerData *pointer_data, GdkDisplay *display, - GdkDevice *master) + GdkDevice *logical_device) { GdkWaylandDisplay *display_wayland; @@ -4870,7 +4871,7 @@ init_pointer_data (GdkWaylandPointerData *pointer_data, wl_compositor_create_surface (display_wayland->compositor); wl_surface_add_listener (pointer_data->pointer_surface, &pointer_surface_listener, - master); + logical_device); } void @@ -4912,7 +4913,7 @@ _gdk_wayland_display_create_seat (GdkWaylandDisplay *display_wayland, &data_device_listener, seat); init_devices (seat); - init_pointer_data (&seat->pointer_info, display, seat->master_pointer); + init_pointer_data (&seat->pointer_info, display, seat->logical_pointer); if (display_wayland->tablet_manager) { @@ -5044,11 +5045,11 @@ gdk_wayland_device_unset_touch_grab (GdkDevice *gdk_device, touch = gdk_wayland_seat_get_touch (seat, GDK_EVENT_SEQUENCE_TO_SLOT (sequence)); - if (GDK_WAYLAND_DEVICE (seat->touch_master)->emulating_touch == touch) + if (GDK_WAYLAND_DEVICE (seat->logical_touch)->emulating_touch == touch) { - GDK_WAYLAND_DEVICE (seat->touch_master)->emulating_touch = NULL; + GDK_WAYLAND_DEVICE (seat->logical_touch)->emulating_touch = NULL; emulate_touch_crossing (touch->surface, NULL, - seat->touch_master, seat->touch, + seat->logical_touch, seat->touch, touch, GDK_LEAVE_NOTIFY, GDK_CROSSING_NORMAL, GDK_CURRENT_TIME); } @@ -5056,10 +5057,10 @@ gdk_wayland_device_unset_touch_grab (GdkDevice *gdk_device, event = gdk_touch_event_new (GDK_TOUCH_CANCEL, GDK_SLOT_TO_EVENT_SEQUENCE (touch->id), touch->surface, - seat->touch_master, + seat->logical_touch, seat->touch, GDK_CURRENT_TIME, - device_get_modifiers (seat->touch_master), + device_get_modifiers (seat->logical_touch), touch->x, touch->y, NULL, touch->initial_touch); diff --git a/gdk/win32/gdkdevice-win32.c b/gdk/win32/gdkdevice-win32.c index edcdb55ddd..129c5a056f 100644 --- a/gdk/win32/gdkdevice-win32.c +++ b/gdk/win32/gdkdevice-win32.c @@ -147,7 +147,7 @@ gdk_device_win32_grab (GdkDevice *device, GdkCursor *cursor, guint32 time_) { - /* No support for grabbing the slave atm */ + /* No support for grabbing physical devices atm */ return GDK_GRAB_NOT_VIEWABLE; } diff --git a/gdk/win32/gdkdevicemanager-win32.c b/gdk/win32/gdkdevicemanager-win32.c index 74d9aa1847..b3f9e75b83 100644 --- a/gdk/win32/gdkdevicemanager-win32.c +++ b/gdk/win32/gdkdevicemanager-win32.c @@ -80,7 +80,7 @@ create_pointer (GdkDeviceManagerWin32 *device_manager, "name", name, "type", type, "source", GDK_SOURCE_MOUSE, - "has-cursor", type == GDK_DEVICE_TYPE_MASTER, + "has-cursor", type == GDK_DEVICE_TYPE_LOGICAL, "display", _gdk_display, NULL); } @@ -565,7 +565,7 @@ wintab_init_check (GdkDeviceManagerWin32 *device_manager) if (device->sends_core) { _gdk_device_set_associated_device (device_manager->system_pointer, GDK_DEVICE (device)); - _gdk_device_add_slave (device_manager->core_pointer, GDK_DEVICE (device)); + _gdk_device_add_physical_device (device_manager->core_pointer, GDK_DEVICE (device)); } g_free (csrname_utf8); @@ -693,40 +693,40 @@ gdk_device_manager_win32_constructed (GObject *object) create_pointer (device_manager, GDK_TYPE_DEVICE_VIRTUAL, "Virtual Core Pointer", - GDK_DEVICE_TYPE_MASTER); + GDK_DEVICE_TYPE_LOGICAL); device_manager->system_pointer = create_pointer (device_manager, GDK_TYPE_DEVICE_WIN32, "System Aggregated Pointer", - GDK_DEVICE_TYPE_SLAVE); + GDK_DEVICE_TYPE_PHYSICAL); _gdk_device_virtual_set_active (device_manager->core_pointer, device_manager->system_pointer); _gdk_device_set_associated_device (device_manager->system_pointer, device_manager->core_pointer); - _gdk_device_add_slave (device_manager->core_pointer, device_manager->system_pointer); + _gdk_device_add_physical_device (device_manager->core_pointer, device_manager->system_pointer); device_manager->core_keyboard = create_keyboard (device_manager, GDK_TYPE_DEVICE_VIRTUAL, "Virtual Core Keyboard", - GDK_DEVICE_TYPE_MASTER); + GDK_DEVICE_TYPE_LOGICAL); device_manager->system_keyboard = create_keyboard (device_manager, GDK_TYPE_DEVICE_WIN32, "System Aggregated Keyboard", - GDK_DEVICE_TYPE_SLAVE); + GDK_DEVICE_TYPE_PHYSICAL); _gdk_device_virtual_set_active (device_manager->core_keyboard, device_manager->system_keyboard); _gdk_device_set_associated_device (device_manager->system_keyboard, device_manager->core_keyboard); - _gdk_device_add_slave (device_manager->core_keyboard, device_manager->system_keyboard); + _gdk_device_add_physical_device (device_manager->core_keyboard, device_manager->system_keyboard); _gdk_device_set_associated_device (device_manager->core_pointer, device_manager->core_keyboard); _gdk_device_set_associated_device (device_manager->core_keyboard, device_manager->core_pointer); - seat = gdk_seat_default_new_for_master_pair (device_manager->core_pointer, - device_manager->core_keyboard); + seat = gdk_seat_default_new_for_logical_pair (device_manager->core_pointer, + device_manager->core_keyboard); gdk_display_add_seat (_gdk_display, seat); - gdk_seat_default_add_slave (GDK_SEAT_DEFAULT (seat), device_manager->system_pointer); - gdk_seat_default_add_slave (GDK_SEAT_DEFAULT (seat), device_manager->system_keyboard); + gdk_seat_default_add_physical_device (GDK_SEAT_DEFAULT (seat), device_manager->system_pointer); + gdk_seat_default_add_physical_device (GDK_SEAT_DEFAULT (seat), device_manager->system_keyboard); g_object_unref (seat); /* Only call Wintab init stuff after the default display diff --git a/gdk/win32/gdkdevicemanager-win32.h b/gdk/win32/gdkdevicemanager-win32.h index 53411d7c5c..f1382b4df8 100644 --- a/gdk/win32/gdkdevicemanager-win32.h +++ b/gdk/win32/gdkdevicemanager-win32.h @@ -34,10 +34,10 @@ struct _GdkDeviceManagerWin32 { GObject parent_object; GdkDisplay *display; - /* Master Devices */ + /* Logical Devices */ GdkDevice *core_pointer; GdkDevice *core_keyboard; - /* Fake slave devices */ + /* Fake physical devices */ GdkDevice *system_pointer; GdkDevice *system_keyboard; GList *wintab_devices; diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c index 912426b3f7..fbc98b83a3 100644 --- a/gdk/x11/gdkdevice-xi2.c +++ b/gdk/x11/gdkdevice-xi2.c @@ -266,8 +266,8 @@ gdk_x11_device_xi2_set_surface_cursor (GdkDevice *device, { GdkX11DeviceXI2 *device_xi2 = GDK_X11_DEVICE_XI2 (device); - /* Non-master devices don't have a cursor */ - if (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_MASTER) + /* Non-logical devices don't have a cursor */ + if (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_LOGICAL) return; if (cursor) @@ -312,12 +312,12 @@ gdk_x11_device_xi2_query_state (GdkDevice *device, scale = GDK_X11_SURFACE (surface)->surface_scale; } - if (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_SLAVE) + if (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_PHYSICAL) { - GdkDevice *master = gdk_device_get_associated_device (device); + GdkDevice *logical = gdk_device_get_associated_device (device); - if (master) - _gdk_device_query_state (master, surface, child_surface, + if (logical != NULL) + _gdk_device_query_state (logical, surface, child_surface, win_x, win_y, mask); return; } diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c index a3a805676d..ced9d905a3 100644 --- a/gdk/x11/gdkdevicemanager-xi2.c +++ b/gdk/x11/gdkdevicemanager-xi2.c @@ -518,11 +518,11 @@ create_device (GdkX11DeviceManagerXI2 *device_manager, { case XIMasterKeyboard: case XIMasterPointer: - type = GDK_DEVICE_TYPE_MASTER; + type = GDK_DEVICE_TYPE_LOGICAL; break; case XISlaveKeyboard: case XISlavePointer: - type = GDK_DEVICE_TYPE_SLAVE; + type = GDK_DEVICE_TYPE_PHYSICAL; break; case XIFloatingSlave: default: @@ -532,7 +532,7 @@ create_device (GdkX11DeviceManagerXI2 *device_manager, GDK_DISPLAY_NOTE (display, INPUT, ({ - const gchar *type_names[] = { "master", "slave", "floating" }; + const gchar *type_names[] = { "logical", "physical", "floating" }; const gchar *source_names[] = { "mouse", "pen", "eraser", "cursor", "keyboard", "direct touch", "indirect touch", "trackpoint", "pad" }; g_message ("input device:\n\tname: %s\n\ttype: %s\n\tsource: %s\n\thas cursor: %d\n\ttouches: %d", dev->name, @@ -590,7 +590,7 @@ ensure_seat_for_device_pair (GdkX11DeviceManagerXI2 *device_manager, keyboard = device2; } - seat = gdk_seat_default_new_for_master_pair (pointer, keyboard); + seat = gdk_seat_default_new_for_logical_pair (pointer, keyboard); gdk_display_add_seat (display, seat); g_object_unref (seat); } @@ -617,20 +617,20 @@ add_device (GdkX11DeviceManagerXI2 *device_manager, { if (dev->use == XISlavePointer || dev->use == XISlaveKeyboard) { - GdkDevice *master; + GdkDevice *logical; GdkSeat *seat; /* The device manager is already constructed, then * keep the hierarchy coherent for the added device. */ - master = g_hash_table_lookup (device_manager->id_table, - GINT_TO_POINTER (dev->attachment)); + logical = g_hash_table_lookup (device_manager->id_table, + GINT_TO_POINTER (dev->attachment)); - _gdk_device_set_associated_device (device, master); - _gdk_device_add_slave (master, device); + _gdk_device_set_associated_device (device, logical); + _gdk_device_add_physical_device (logical, device); - seat = gdk_device_get_seat (master); - gdk_seat_default_add_slave (GDK_SEAT_DEFAULT (seat), device); + seat = gdk_device_get_seat (logical); + gdk_seat_default_add_physical_device (GDK_SEAT_DEFAULT (seat), device); } else if (dev->use == XIMasterPointer || dev->use == XIMasterKeyboard) { @@ -659,10 +659,10 @@ detach_from_seat (GdkDevice *device) if (!seat) return; - if (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_MASTER) + if (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_LOGICAL) gdk_display_remove_seat (gdk_device_get_display (device), seat); - else if (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_SLAVE) - gdk_seat_default_remove_slave (GDK_SEAT_DEFAULT (seat), device); + else if (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_PHYSICAL) + gdk_seat_default_remove_physical_device (GDK_SEAT_DEFAULT (seat), device); } static void @@ -688,9 +688,9 @@ remove_device (GdkX11DeviceManagerXI2 *device_manager, } static void -relate_masters (gpointer key, - gpointer value, - gpointer user_data) +relate_logical_devices (gpointer key, + gpointer value, + gpointer user_data) { GdkX11DeviceManagerXI2 *device_manager; GdkDevice *device, *relative; @@ -705,23 +705,23 @@ relate_masters (gpointer key, } static void -relate_slaves (gpointer key, - gpointer value, - gpointer user_data) +relate_physical_devices (gpointer key, + gpointer value, + gpointer user_data) { GdkX11DeviceManagerXI2 *device_manager; - GdkDevice *slave, *master; + GdkDevice *physical, *logical; GdkSeat *seat; device_manager = user_data; - slave = g_hash_table_lookup (device_manager->id_table, key); - master = g_hash_table_lookup (device_manager->id_table, value); + physical = g_hash_table_lookup (device_manager->id_table, key); + logical = g_hash_table_lookup (device_manager->id_table, value); - _gdk_device_set_associated_device (slave, master); - _gdk_device_add_slave (master, slave); + _gdk_device_set_associated_device (physical, logical); + _gdk_device_add_physical_device (logical, physical); - seat = gdk_device_get_seat (master); - gdk_seat_default_add_slave (GDK_SEAT_DEFAULT (seat), slave); + seat = gdk_device_get_seat (logical); + gdk_seat_default_add_physical_device (GDK_SEAT_DEFAULT (seat), physical); } static void @@ -729,7 +729,7 @@ gdk_x11_device_manager_xi2_constructed (GObject *object) { GdkX11DeviceManagerXI2 *device_manager; GdkDisplay *display; - GHashTable *masters, *slaves; + GHashTable *logical_devices, *physical_devices; Display *xdisplay; XIDeviceInfo *info, *dev; int ndevices, i; @@ -744,8 +744,8 @@ gdk_x11_device_manager_xi2_constructed (GObject *object) g_assert (device_manager->major == 2); - masters = g_hash_table_new (NULL, NULL); - slaves = g_hash_table_new (NULL, NULL); + logical_devices = g_hash_table_new (NULL, NULL); + physical_devices = g_hash_table_new (NULL, NULL); info = XIQueryDevice (xdisplay, XIAllDevices, &ndevices); @@ -762,14 +762,14 @@ gdk_x11_device_manager_xi2_constructed (GObject *object) if (dev->use == XIMasterPointer || dev->use == XIMasterKeyboard) { - g_hash_table_insert (masters, + g_hash_table_insert (logical_devices, GINT_TO_POINTER (dev->deviceid), GINT_TO_POINTER (dev->attachment)); } else if (dev->use == XISlavePointer || dev->use == XISlaveKeyboard) { - g_hash_table_insert (slaves, + g_hash_table_insert (physical_devices, GINT_TO_POINTER (dev->deviceid), GINT_TO_POINTER (dev->attachment)); } @@ -778,11 +778,11 @@ gdk_x11_device_manager_xi2_constructed (GObject *object) XIFreeDeviceInfo (info); /* Stablish relationships between devices */ - g_hash_table_foreach (masters, relate_masters, object); - g_hash_table_destroy (masters); + g_hash_table_foreach (logical_devices, relate_logical_devices, object); + g_hash_table_destroy (logical_devices); - g_hash_table_foreach (slaves, relate_slaves, object); - g_hash_table_destroy (slaves); + g_hash_table_foreach (physical_devices, relate_physical_devices, object); + g_hash_table_destroy (physical_devices); /* Connect to hierarchy change events */ XISetMask (mask, XI_HierarchyChanged); @@ -917,28 +917,28 @@ handle_hierarchy_changed (GdkX11DeviceManagerXI2 *device_manager, else if (ev->info[i].flags & XISlaveAttached || ev->info[i].flags & XISlaveDetached) { - GdkDevice *master, *slave; + GdkDevice *logical, *physical; GdkSeat *seat; - slave = g_hash_table_lookup (device_manager->id_table, - GINT_TO_POINTER (ev->info[i].deviceid)); + physical = g_hash_table_lookup (device_manager->id_table, + GINT_TO_POINTER (ev->info[i].deviceid)); - if (!slave) + if (!physical) continue; - /* Remove old master info */ - master = gdk_device_get_associated_device (slave); + /* Remove old logical device info */ + logical = gdk_device_get_associated_device (physical); - if (master) + if (logical != NULL) { - _gdk_device_remove_slave (master, slave); - _gdk_device_set_associated_device (slave, NULL); + _gdk_device_remove_physical_device (logical, physical); + _gdk_device_set_associated_device (physical, NULL); - seat = gdk_device_get_seat (master); - gdk_seat_default_remove_slave (GDK_SEAT_DEFAULT (seat), slave); + seat = gdk_device_get_seat (logical); + gdk_seat_default_remove_physical_device (GDK_SEAT_DEFAULT (seat), physical); } - /* Add new master if it's an attachment event */ + /* Add new logical device if it's an attachment event */ if (ev->info[i].flags & XISlaveAttached) { gdk_x11_display_error_trap_push (display); @@ -946,18 +946,18 @@ handle_hierarchy_changed (GdkX11DeviceManagerXI2 *device_manager, gdk_x11_display_error_trap_pop_ignored (display); if (info) { - master = g_hash_table_lookup (device_manager->id_table, - GINT_TO_POINTER (info->attachment)); + logical = g_hash_table_lookup (device_manager->id_table, + GINT_TO_POINTER (info->attachment)); XIFreeDeviceInfo (info); } - if (master) + if (logical != NULL) { - _gdk_device_set_associated_device (slave, master); - _gdk_device_add_slave (master, slave); + _gdk_device_set_associated_device (physical, logical); + _gdk_device_add_physical_device (logical, physical); - seat = gdk_device_get_seat (master); - gdk_seat_default_add_slave (GDK_SEAT_DEFAULT (seat), slave); + seat = gdk_device_get_seat (logical); + gdk_seat_default_add_physical_device (GDK_SEAT_DEFAULT (seat), physical); } } } @@ -1722,13 +1722,14 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator, /* When scrolling, X might send events twice here; once with both the * device and the source device set to the physical device, and once - * with the device set to the master device. + * with the device set to the logical device. + * * Since we are only interested in the latter, and * scroll_valuators_changed() updates the valuator cache for the * source device, we need to explicitly ignore the first event in * order to get the correct delta for the second. */ - if (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_SLAVE && + if (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_PHYSICAL && scroll_valuators_changed (GDK_X11_DEVICE_XI2 (source_device), &xev->valuators, &delta_x, &delta_y)) { @@ -1894,18 +1895,18 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator, xev->detail != XINotifyInferior && xev->mode != XINotifyPassiveUngrab && GDK_IS_TOPLEVEL (surface)) { - if (gdk_device_get_device_type (source_device) != GDK_DEVICE_TYPE_MASTER) + if (gdk_device_get_device_type (source_device) != GDK_DEVICE_TYPE_LOGICAL) _gdk_device_xi2_reset_scroll_valuators (GDK_X11_DEVICE_XI2 (source_device)); else { - GList *slaves, *l; + GList *physical_devices, *l; - slaves = gdk_device_list_slave_devices (source_device); + physical_devices = gdk_device_list_physical_devices (source_device); - for (l = slaves; l; l = l->next) + for (l = physical_devices; l; l = l->next) _gdk_device_xi2_reset_scroll_valuators (GDK_X11_DEVICE_XI2 (l->data)); - g_list_free (slaves); + g_list_free (physical_devices); } } diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index 6acf25c37d..9804d0ea79 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -1765,7 +1765,9 @@ device_grab_update_callback (GdkDisplay *display, pointer_info = _gdk_display_get_pointer_info (display, device); _gdk_display_device_grab_update (display, device, - pointer_info->last_slave ? pointer_info->last_slave : device, + pointer_info->last_physical_device != NULL + ? pointer_info->last_physical_device + : device, serial); } diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c index 86e8c2541e..62cbf7b654 100644 --- a/gdk/x11/gdkmain-x11.c +++ b/gdk/x11/gdkmain-x11.c @@ -141,7 +141,7 @@ _gdk_x11_surface_grab_check_unmap (GdkSurface *surface, seat = gdk_display_get_default_seat (display); - devices = gdk_seat_get_slaves (seat, GDK_SEAT_CAPABILITY_ALL); + devices = gdk_seat_get_physical_devices (seat, GDK_SEAT_CAPABILITY_ALL); devices = g_list_prepend (devices, gdk_seat_get_keyboard (seat)); devices = g_list_prepend (devices, gdk_seat_get_pointer (seat)); @@ -169,7 +169,7 @@ _gdk_x11_surface_grab_check_destroy (GdkSurface *surface) seat = gdk_display_get_default_seat (display); - devices = gdk_seat_get_slaves (seat, GDK_SEAT_CAPABILITY_ALL); + devices = gdk_seat_get_physical_devices (seat, GDK_SEAT_CAPABILITY_ALL); devices = g_list_prepend (devices, gdk_seat_get_keyboard (seat)); devices = g_list_prepend (devices, gdk_seat_get_pointer (seat)); diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c index 0bae7a5e03..54bf26aae6 100644 --- a/gdk/x11/gdksurface-x11.c +++ b/gdk/x11/gdksurface-x11.c @@ -4335,7 +4335,8 @@ _should_perform_ewmh_drag (GdkSurface *surface, display = gdk_surface_get_display (surface); info = _gdk_display_get_pointer_info (display, device); - if ((!info->last_slave || gdk_device_get_source (info->last_slave) != GDK_SOURCE_TOUCHSCREEN) && + if ((info->last_physical_device == NULL || + gdk_device_get_source (info->last_physical_device) != GDK_SOURCE_TOUCHSCREEN) && gdk_x11_screen_supports_net_wm_hint (GDK_SURFACE_SCREEN (surface), g_intern_static_string ("_NET_WM_MOVERESIZE"))) return TRUE; |