[gtk+] Drop the monitors-changed signal
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Drop the monitors-changed signal
- Date: Wed, 1 Nov 2017 02:56:37 +0000 (UTC)
commit 727aa6cb08f15ee2ee98851b0f4db0cdc44771c1
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Oct 31 22:26:39 2017 -0400
Drop the monitors-changed signal
We are not using it anymore.
gdk/gdkscreen.c | 34 +---------------------------------
gdk/gdkscreenprivate.h | 3 ---
gdk/mir/gdkmirscreen.c | 2 --
gdk/quartz/gdkscreen-quartz.c | 6 ------
gdk/win32/gdkscreen-win32.c | 7 +------
gdk/x11/gdkscreen-x11.c | 7 +------
6 files changed, 3 insertions(+), 56 deletions(-)
---
diff --git a/gdk/gdkscreen.c b/gdk/gdkscreen.c
index 6eb99b7..d217508 100644
--- a/gdk/gdkscreen.c
+++ b/gdk/gdkscreen.c
@@ -44,43 +44,11 @@
*/
-enum
-{
- SIZE_CHANGED,
- MONITORS_CHANGED,
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
G_DEFINE_TYPE (GdkScreen, gdk_screen, G_TYPE_OBJECT)
static void
gdk_screen_class_init (GdkScreenClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- /**
- * GdkScreen::monitors-changed:
- * @screen: the object on which the signal is emitted
- *
- * The ::monitors-changed signal is emitted when the number, size
- * or position of the monitors attached to the screen change.
- *
- * Only for X11 and OS X for now. A future implementation for Win32
- * may be a possibility.
- *
- * Since: 2.14
- */
- signals[MONITORS_CHANGED] =
- g_signal_new (g_intern_static_string ("monitors-changed"),
- G_OBJECT_CLASS_TYPE (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GdkScreenClass, monitors_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE,
- 0);
}
static void
@@ -88,7 +56,7 @@ gdk_screen_init (GdkScreen *screen)
{
}
-void
+void
_gdk_screen_close (GdkScreen *screen)
{
g_return_if_fail (GDK_IS_SCREEN (screen));
diff --git a/gdk/gdkscreenprivate.h b/gdk/gdkscreenprivate.h
index ffc2131..3b0735e 100644
--- a/gdk/gdkscreenprivate.h
+++ b/gdk/gdkscreenprivate.h
@@ -41,9 +41,6 @@ struct _GdkScreenClass
GObjectClass parent_class;
GdkDisplay * (* get_display) (GdkScreen *screen);
-
- /* Signals: */
- void (*monitors_changed) (GdkScreen *screen);
};
G_END_DECLS
diff --git a/gdk/mir/gdkmirscreen.c b/gdk/mir/gdkmirscreen.c
index 558bd0e..76ae194 100644
--- a/gdk/mir/gdkmirscreen.c
+++ b/gdk/mir/gdkmirscreen.c
@@ -118,8 +118,6 @@ config_changed_cb (MirConnection *connection, void *data)
GdkMirScreen *screen = data;
update_display_config (screen);
-
- g_signal_emit_by_name (screen, "monitors-changed");
}
GdkScreen *
diff --git a/gdk/quartz/gdkscreen-quartz.c b/gdk/quartz/gdkscreen-quartz.c
index 452f84b..96ba223 100644
--- a/gdk/quartz/gdkscreen-quartz.c
+++ b/gdk/quartz/gdkscreen-quartz.c
@@ -228,12 +228,6 @@ process_display_reconfiguration (GdkQuartzScreen *screen)
gdk_quartz_screen_calculate_layout (GDK_QUARTZ_SCREEN (screen));
_gdk_quartz_screen_update_window_sizes (GDK_SCREEN (screen));
-
- if (screen->emit_monitors_changed)
- {
- g_signal_emit_by_name (screen, "monitors-changed");
- screen->emit_monitors_changed = FALSE;
- }
}
static gboolean
diff --git a/gdk/win32/gdkscreen-win32.c b/gdk/win32/gdkscreen-win32.c
index 4a93cc7..4c9b4d7 100644
--- a/gdk/win32/gdkscreen-win32.c
+++ b/gdk/win32/gdkscreen-win32.c
@@ -136,14 +136,9 @@ gdk_win32_screen_init (GdkWin32Screen *win32_screen)
void
_gdk_win32_screen_on_displaychange_event (GdkWin32Screen *screen)
{
- gboolean monitors_changed;
-
- monitors_changed = _gdk_win32_display_init_monitors (GDK_WIN32_DISPLAY (_gdk_display));
+ _gdk_win32_display_init_monitors (GDK_WIN32_DISPLAY (_gdk_display));
init_root_window_size (screen);
-
- if (monitors_changed)
- g_signal_emit_by_name (screen, "monitors-changed");
}
void
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
index bfa18bf..07fbba6 100644
--- a/gdk/x11/gdkscreen-x11.c
+++ b/gdk/x11/gdkscreen-x11.c
@@ -858,8 +858,6 @@ _gdk_x11_screen_set_window_scale (GdkX11Screen *x11_screen,
gdk_monitor_set_scale_factor (monitor, scale);
}
-
- g_signal_emit_by_name (GDK_SCREEN (x11_screen), "monitors-changed");
}
static void
@@ -887,10 +885,7 @@ init_randr_support (GdkScreen *screen)
static void
process_monitors_change (GdkScreen *screen)
{
- if (init_multihead (screen))
- {
- g_signal_emit_by_name (screen, "monitors-changed");
- }
+ init_multihead (screen);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]