Move position-changed / size-changed signals to the MetaWindow
They fit more appropriately over here... https://bugzilla.gnome.org/show_bug.cgi?id=720631
This commit is contained in:
@ -215,6 +215,8 @@ enum
|
||||
FOCUS,
|
||||
RAISED,
|
||||
UNMANAGED,
|
||||
SIZE_CHANGED,
|
||||
POSITION_CHANGED,
|
||||
|
||||
LAST_SIGNAL
|
||||
};
|
||||
@ -611,6 +613,22 @@ meta_window_class_init (MetaWindowClass *klass)
|
||||
G_STRUCT_OFFSET (MetaWindowClass, unmanaged),
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
window_signals[POSITION_CHANGED] =
|
||||
g_signal_new ("position-changed",
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
window_signals[SIZE_CHANGED] =
|
||||
g_signal_new ("size-changed",
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -5377,6 +5395,12 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
else if (is_user_action)
|
||||
save_user_window_placement (window);
|
||||
|
||||
if (need_move_frame)
|
||||
g_signal_emit (window, window_signals[POSITION_CHANGED], 0);
|
||||
|
||||
if (need_resize_client)
|
||||
g_signal_emit (window, window_signals[SIZE_CHANGED], 0);
|
||||
|
||||
if (need_move_frame || need_resize_frame ||
|
||||
need_move_client || need_resize_client ||
|
||||
did_placement || is_wayland_resize)
|
||||
|
Reference in New Issue
Block a user