x11: create GdkSeat also in GdkX11DeviceManagerCore

There are at least few cases when GdkX11DeviceManagerXI2 will not
be used. Make sure that we have GdkSeat in such cases.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
This commit is contained in:
Alberts Muktupāvels 2015-12-19 19:21:10 +02:00 committed by Carlos Garnacho
parent 31f319d1c7
commit 54c32fae1e

View File

@ -22,6 +22,7 @@
#include "gdkx11device-core.h"
#include "gdkdeviceprivate.h"
#include "gdkseatdefaultprivate.h"
#include "gdkdisplayprivate.h"
#include "gdkeventtranslator.h"
#include "gdkprivate-x11.h"
@ -129,6 +130,18 @@ gdk_x11_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);
/* We expect subclasses to handle their own seats */
if (G_OBJECT_TYPE (object) == GDK_TYPE_X11_DEVICE_MANAGER_CORE)
{
GdkSeat *seat;
seat = gdk_seat_default_new_for_master_pair (device_manager->core_pointer,
device_manager->core_keyboard);
gdk_display_add_seat (display, seat);
g_object_unref (seat);
}
}
static void