Commit a30b84f5 authored by Benjamin Otte's avatar Benjamin Otte

wayland: Don't add/remove displays manually

This code is handled by GdkDisplay itself these days.
parent 0122a9da
...@@ -260,8 +260,6 @@ gdk_wayland_display_dispose (GObject *object) ...@@ -260,8 +260,6 @@ gdk_wayland_display_dispose (GObject *object)
{ {
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (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, g_list_foreach (display_wayland->input_devices,
(GFunc) g_object_run_dispose, NULL); (GFunc) g_object_run_dispose, NULL);
...@@ -613,9 +611,6 @@ gdk_wayland_display_class_init (GdkWaylandDisplayClass * class) ...@@ -613,9 +611,6 @@ gdk_wayland_display_class_init (GdkWaylandDisplayClass * class)
static void static void
gdk_wayland_display_init (GdkWaylandDisplay *display) 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); display->xkb_context = xkb_context_new (0);
} }
......
...@@ -101,31 +101,3 @@ gdk_wayland_display_manager_init (GdkWaylandDisplayManager *manager) ...@@ -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, ...@@ -167,11 +167,6 @@ void _gdk_wayland_screen_remove_output (GdkScreen *screen,
int _gdk_wayland_screen_get_output_refresh_rate (GdkScreen *screen, int _gdk_wayland_screen_get_output_refresh_rate (GdkScreen *screen,
struct wl_output *output); 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, void _gdk_wayland_window_set_device_grabbed (GdkWindow *window,
GdkDevice *device, GdkDevice *device,
struct wl_seat *seat, struct wl_seat *seat,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment