forked from AuroraMiddleware/gtk
wayland: Don't add/remove displays manually
This code is handled by GdkDisplay itself these days.
This commit is contained in:
parent
0122a9da8e
commit
a30b84f522
@ -260,8 +260,6 @@ gdk_wayland_display_dispose (GObject *object)
|
||||
{
|
||||
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (object);
|
||||
|
||||
_gdk_wayland_display_manager_remove_display (gdk_display_manager_get (),
|
||||
GDK_DISPLAY (display_wayland));
|
||||
g_list_foreach (display_wayland->input_devices,
|
||||
(GFunc) g_object_run_dispose, NULL);
|
||||
|
||||
@ -613,9 +611,6 @@ gdk_wayland_display_class_init (GdkWaylandDisplayClass * class)
|
||||
static void
|
||||
gdk_wayland_display_init (GdkWaylandDisplay *display)
|
||||
{
|
||||
_gdk_wayland_display_manager_add_display (gdk_display_manager_get (),
|
||||
GDK_DISPLAY (display));
|
||||
|
||||
display->xkb_context = xkb_context_new (0);
|
||||
}
|
||||
|
||||
|
@ -101,31 +101,3 @@ gdk_wayland_display_manager_init (GdkWaylandDisplayManager *manager)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_wayland_display_manager_add_display (GdkDisplayManager *manager,
|
||||
GdkDisplay *display)
|
||||
{
|
||||
GdkWaylandDisplayManager *manager_wayland = GDK_WAYLAND_DISPLAY_MANAGER (manager);
|
||||
|
||||
if (manager_wayland->displays == NULL)
|
||||
gdk_display_manager_set_default_display (manager, display);
|
||||
|
||||
manager_wayland->displays = g_slist_prepend (manager_wayland->displays, display);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_wayland_display_manager_remove_display (GdkDisplayManager *manager,
|
||||
GdkDisplay *display)
|
||||
{
|
||||
GdkWaylandDisplayManager *manager_wayland = GDK_WAYLAND_DISPLAY_MANAGER (manager);
|
||||
|
||||
manager_wayland->displays = g_slist_remove (manager_wayland->displays, display);
|
||||
|
||||
if (gdk_display_manager_get_default_display (manager) == display)
|
||||
{
|
||||
if (manager_wayland->displays)
|
||||
gdk_display_manager_set_default_display (manager, manager_wayland->displays->data);
|
||||
else
|
||||
gdk_display_manager_set_default_display (manager, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -167,11 +167,6 @@ void _gdk_wayland_screen_remove_output (GdkScreen *screen,
|
||||
int _gdk_wayland_screen_get_output_refresh_rate (GdkScreen *screen,
|
||||
struct wl_output *output);
|
||||
|
||||
void _gdk_wayland_display_manager_add_display (GdkDisplayManager *manager,
|
||||
GdkDisplay *display);
|
||||
void _gdk_wayland_display_manager_remove_display (GdkDisplayManager *manager,
|
||||
GdkDisplay *display);
|
||||
|
||||
void _gdk_wayland_window_set_device_grabbed (GdkWindow *window,
|
||||
GdkDevice *device,
|
||||
struct wl_seat *seat,
|
||||
|
Loading…
Reference in New Issue
Block a user