window: Add a window helper function for MetaWindowConfig
The MetaWindowConfig can indicate whether the configuration reflects on the initial configuration, before the window is first mapped. Add a smaller helper (private) window function to create the appropriate "type" of MetaWindowConfig depending whether the window was already showed or not. This is preparation work for the following commits where this function will be used. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4076>
This commit is contained in:
parent
d44fd167bb
commit
5a231a4d27
@ -896,3 +896,5 @@ gboolean meta_window_is_tiled_side_by_side (MetaWindow *window);
|
||||
gboolean meta_window_is_tiled_left (MetaWindow *window);
|
||||
|
||||
gboolean meta_window_is_tiled_right (MetaWindow *window);
|
||||
|
||||
MetaWindowConfig * meta_window_new_window_config (MetaWindow *window);
|
||||
|
@ -72,6 +72,7 @@
|
||||
#include "core/boxes-private.h"
|
||||
#include "core/constraints.h"
|
||||
#include "core/keybindings-private.h"
|
||||
#include "core/meta-window-config-private.h"
|
||||
#include "core/meta-workspace-manager-private.h"
|
||||
#include "core/place.h"
|
||||
#include "core/stack.h"
|
||||
@ -8241,3 +8242,12 @@ meta_window_get_client_content_rect (MetaWindow *window,
|
||||
meta_window_frame_rect_to_client_rect (window, rect, rect);
|
||||
#endif
|
||||
}
|
||||
|
||||
MetaWindowConfig *
|
||||
meta_window_new_window_config (MetaWindow *window)
|
||||
{
|
||||
if (window->showing_for_first_time)
|
||||
return meta_window_config_initial_new ();
|
||||
else
|
||||
return meta_window_config_new ();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user