Drop the monitors-changed signal

We are not using it anymore.
This commit is contained in:
Matthias Clasen 2017-10-31 22:26:39 -04:00
parent 29ffecb39c
commit 727aa6cb08
6 changed files with 3 additions and 56 deletions

View File

@ -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

View File

@ -41,9 +41,6 @@ struct _GdkScreenClass
GObjectClass parent_class;
GdkDisplay * (* get_display) (GdkScreen *screen);
/* Signals: */
void (*monitors_changed) (GdkScreen *screen);
};
G_END_DECLS

View File

@ -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 *

View File

@ -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

View File

@ -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

View File

@ -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