window: Add a "configure" signal
This conveys the initial window configuration. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4076>
This commit is contained in:
parent
4c20584b11
commit
d44fd167bb
@ -34,6 +34,7 @@
|
||||
#include "backends/meta-logical-monitor.h"
|
||||
#include "clutter/clutter.h"
|
||||
#include "core/stack.h"
|
||||
#include "meta/meta-window-config.h"
|
||||
#include "meta/compositor.h"
|
||||
#include "meta/meta-close-dialog.h"
|
||||
#include "meta/util.h"
|
||||
@ -812,6 +813,9 @@ void meta_window_ensure_close_dialog_timeout (MetaWindow *window);
|
||||
|
||||
void meta_window_emit_size_changed (MetaWindow *window);
|
||||
|
||||
void meta_window_emit_configure (MetaWindow *window,
|
||||
MetaWindowConfig *window_config);
|
||||
|
||||
MetaPlacementRule *meta_window_get_placement_rule (MetaWindow *window);
|
||||
|
||||
void meta_window_force_placement (MetaWindow *window,
|
||||
|
@ -81,6 +81,7 @@
|
||||
#include "meta/meta-cursor-tracker.h"
|
||||
#include "meta/meta-enum-types.h"
|
||||
#include "meta/prefs.h"
|
||||
#include "meta/meta-window-config.h"
|
||||
|
||||
#ifdef HAVE_X11_CLIENT
|
||||
#include "mtk/mtk-x11.h"
|
||||
@ -241,6 +242,7 @@ enum
|
||||
POSITION_CHANGED,
|
||||
SHOWN,
|
||||
HIGHEST_SCALE_MONITOR_CHANGED,
|
||||
CONFIGURE,
|
||||
|
||||
LAST_SIGNAL
|
||||
};
|
||||
@ -733,6 +735,20 @@ meta_window_class_init (MetaWindowClass *klass)
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
/**
|
||||
* MetaWindow::configure:
|
||||
* @window: a #MetaWindow
|
||||
* @window_config: a #MetaWindowConfig
|
||||
*/
|
||||
window_signals[CONFIGURE] =
|
||||
g_signal_new ("configure",
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
META_TYPE_WINDOW_CONFIG);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -7587,6 +7603,13 @@ meta_window_get_placement_rule (MetaWindow *window)
|
||||
return window->placement.rule;
|
||||
}
|
||||
|
||||
void
|
||||
meta_window_emit_configure (MetaWindow *window,
|
||||
MetaWindowConfig *window_config)
|
||||
{
|
||||
g_signal_emit (window, window_signals[CONFIGURE], 0, window_config);
|
||||
}
|
||||
|
||||
void
|
||||
meta_window_force_restore_shortcuts (MetaWindow *window,
|
||||
ClutterInputDevice *source)
|
||||
|
Loading…
x
Reference in New Issue
Block a user