summaryrefslogtreecommitdiff
path: root/gdk/broadway
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2013-04-10 23:11:52 +0200
committerBenjamin Otte <otte@redhat.com>2013-04-15 15:43:26 +0200
commit7ef508ff4a40c11c8ef58e8f74ba7ad0e93888a3 (patch)
tree82baff5a09882dd29c07f37d5f54e56b7cf82ece /gdk/broadway
parentd29a4411065ce9eb75e2976bac9593a6709fb6d0 (diff)
downloadgtk+-7ef508ff4a40c11c8ef58e8f74ba7ad0e93888a3.tar.gz
displaymanager: Handle list of displays in base class
This moves the add/remove_display() functions from the subclasses to GdkDisplay and GdkDisplayManager. It also gets rid of the list_displays vfunc.
Diffstat (limited to 'gdk/broadway')
-rw-r--r--gdk/broadway/gdkdisplay-broadway.c5
-rw-r--r--gdk/broadway/gdkdisplaymanager-broadway.c40
-rw-r--r--gdk/broadway/gdkprivate-broadway.h4
3 files changed, 0 insertions, 49 deletions
diff --git a/gdk/broadway/gdkdisplay-broadway.c b/gdk/broadway/gdkdisplay-broadway.c
index ed24fe0c34..7534a9fa07 100644
--- a/gdk/broadway/gdkdisplay-broadway.c
+++ b/gdk/broadway/gdkdisplay-broadway.c
@@ -55,8 +55,6 @@ G_DEFINE_TYPE (GdkBroadwayDisplay, gdk_broadway_display, GDK_TYPE_DISPLAY)
static void
gdk_broadway_display_init (GdkBroadwayDisplay *display)
{
- _gdk_broadway_display_manager_add_display (gdk_display_manager_get (),
- GDK_DISPLAY_OBJECT (display));
display->id_ht = g_hash_table_new (NULL, NULL);
}
@@ -239,9 +237,6 @@ gdk_broadway_display_dispose (GObject *object)
{
GdkBroadwayDisplay *broadway_display = GDK_BROADWAY_DISPLAY (object);
- _gdk_broadway_display_manager_remove_display (gdk_display_manager_get (),
- GDK_DISPLAY_OBJECT (object));
-
g_list_foreach (broadway_display->input_devices, (GFunc) g_object_run_dispose, NULL);
_gdk_screen_close (broadway_display->screens[0]);
diff --git a/gdk/broadway/gdkdisplaymanager-broadway.c b/gdk/broadway/gdkdisplaymanager-broadway.c
index 461a099e02..468d4fc6d6 100644
--- a/gdk/broadway/gdkdisplaymanager-broadway.c
+++ b/gdk/broadway/gdkdisplaymanager-broadway.c
@@ -34,8 +34,6 @@ struct _GdkBroadwayDisplayManager
{
GdkDisplayManager parent;
- GSList *displays;
-
gboolean init_failed;
};
@@ -90,14 +88,6 @@ gdk_broadway_display_manager_open_display (GdkDisplayManager *manager,
return _gdk_broadway_display_open (name);
}
-static GSList *
-gdk_broadway_display_manager_list_displays (GdkDisplayManager *manager)
-{
- GdkBroadwayDisplayManager *manager_broadway = GDK_BROADWAY_DISPLAY_MANAGER (manager);
-
- return g_slist_copy (manager_broadway->displays);
-}
-
#include "../gdkkeynames.c"
static gchar *
@@ -137,38 +127,8 @@ gdk_broadway_display_manager_class_init (GdkBroadwayDisplayManagerClass *class)
object_class->finalize = gdk_broadway_display_manager_finalize;
manager_class->open_display = gdk_broadway_display_manager_open_display;
- manager_class->list_displays = gdk_broadway_display_manager_list_displays;
manager_class->atom_intern = _gdk_broadway_display_manager_atom_intern;
manager_class->get_atom_name = _gdk_broadway_display_manager_get_atom_name;
manager_class->lookup_keyval = gdk_broadway_display_manager_lookup_keyval;
manager_class->get_keyval_name = gdk_broadway_display_manager_get_keyval_name;
}
-
-void
-_gdk_broadway_display_manager_add_display (GdkDisplayManager *manager,
- GdkDisplay *display)
-{
- GdkBroadwayDisplayManager *manager_broadway = GDK_BROADWAY_DISPLAY_MANAGER (manager);
-
- if (manager_broadway->displays == NULL)
- gdk_display_manager_set_default_display (manager, display);
-
- manager_broadway->displays = g_slist_prepend (manager_broadway->displays, display);
-}
-
-void
-_gdk_broadway_display_manager_remove_display (GdkDisplayManager *manager,
- GdkDisplay *display)
-{
- GdkBroadwayDisplayManager *manager_broadway = GDK_BROADWAY_DISPLAY_MANAGER (manager);
-
- manager_broadway->displays = g_slist_remove (manager_broadway->displays, display);
-
- if (gdk_display_manager_get_default_display (manager) == display)
- {
- if (manager_broadway->displays)
- gdk_display_manager_set_default_display (manager, manager_broadway->displays->data);
- else
- gdk_display_manager_set_default_display (manager, NULL);
- }
-}
diff --git a/gdk/broadway/gdkprivate-broadway.h b/gdk/broadway/gdkprivate-broadway.h
index e611ca8c39..b631e04178 100644
--- a/gdk/broadway/gdkprivate-broadway.h
+++ b/gdk/broadway/gdkprivate-broadway.h
@@ -44,10 +44,6 @@ void _gdk_broadway_windowing_init (void);
gchar * _gdk_broadway_display_manager_get_atom_name (GdkDisplayManager *manager,
GdkAtom atom);
-void _gdk_broadway_display_manager_add_display (GdkDisplayManager *manager,
- GdkDisplay *display);
-void _gdk_broadway_display_manager_remove_display (GdkDisplayManager *manager,
- GdkDisplay *display);
GdkAtom _gdk_broadway_display_manager_atom_intern_static_string (GdkDisplayManager *manager,
const gchar *atom_name);
GdkAtom _gdk_broadway_display_manager_atom_intern (GdkDisplayManager *manager,