mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
wayland/window-configuration: Track resize flags and gravity too
Will later be used to determine in what way a pending configuration will resize. https://gitlab.gnome.org/GNOME/mutter/merge_requests/705
This commit is contained in:
parent
0dac91cffc
commit
6c82feb1b8
@ -25,10 +25,12 @@
|
|||||||
static uint32_t global_serial_counter = 0;
|
static uint32_t global_serial_counter = 0;
|
||||||
|
|
||||||
MetaWaylandWindowConfiguration *
|
MetaWaylandWindowConfiguration *
|
||||||
meta_wayland_window_configuration_new (int x,
|
meta_wayland_window_configuration_new (int x,
|
||||||
int y,
|
int y,
|
||||||
int width,
|
int width,
|
||||||
int height)
|
int height,
|
||||||
|
MetaMoveResizeFlags flags,
|
||||||
|
MetaGravity gravity)
|
||||||
{
|
{
|
||||||
MetaWaylandWindowConfiguration *configuration;
|
MetaWaylandWindowConfiguration *configuration;
|
||||||
|
|
||||||
@ -43,6 +45,9 @@ meta_wayland_window_configuration_new (int x,
|
|||||||
.has_size = TRUE,
|
.has_size = TRUE,
|
||||||
.width = width,
|
.width = width,
|
||||||
.height = height,
|
.height = height,
|
||||||
|
|
||||||
|
.gravity = gravity,
|
||||||
|
.flags = flags,
|
||||||
};
|
};
|
||||||
|
|
||||||
return configuration;
|
return configuration;
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "core/window-private.h"
|
||||||
#include "wayland/meta-wayland-types.h"
|
#include "wayland/meta-wayland-types.h"
|
||||||
|
|
||||||
struct _MetaWaylandWindowConfiguration
|
struct _MetaWaylandWindowConfiguration
|
||||||
@ -41,12 +42,17 @@ struct _MetaWaylandWindowConfiguration
|
|||||||
gboolean has_size;
|
gboolean has_size;
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
|
|
||||||
|
MetaGravity gravity;
|
||||||
|
MetaMoveResizeFlags flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
MetaWaylandWindowConfiguration * meta_wayland_window_configuration_new (int x,
|
MetaWaylandWindowConfiguration * meta_wayland_window_configuration_new (int x,
|
||||||
int y,
|
int y,
|
||||||
int width,
|
int width,
|
||||||
int height);
|
int height,
|
||||||
|
MetaMoveResizeFlags flags,
|
||||||
|
MetaGravity gravity);
|
||||||
|
|
||||||
MetaWaylandWindowConfiguration * meta_wayland_window_configuration_new_relative (int rel_x,
|
MetaWaylandWindowConfiguration * meta_wayland_window_configuration_new_relative (int rel_x,
|
||||||
int rel_y,
|
int rel_y,
|
||||||
|
@ -190,7 +190,9 @@ surface_state_changed (MetaWindow *window)
|
|||||||
meta_wayland_window_configuration_new (wl_window->last_sent_x,
|
meta_wayland_window_configuration_new (wl_window->last_sent_x,
|
||||||
wl_window->last_sent_y,
|
wl_window->last_sent_y,
|
||||||
wl_window->last_sent_width,
|
wl_window->last_sent_width,
|
||||||
wl_window->last_sent_height);
|
wl_window->last_sent_height,
|
||||||
|
META_MOVE_RESIZE_STATE_CHANGED,
|
||||||
|
META_GRAVITY_NONE);
|
||||||
|
|
||||||
meta_window_wayland_configure (wl_window, configuration);
|
meta_window_wayland_configure (wl_window, configuration);
|
||||||
}
|
}
|
||||||
@ -340,7 +342,9 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
|
|||||||
meta_wayland_window_configuration_new (configured_x,
|
meta_wayland_window_configuration_new (configured_x,
|
||||||
configured_y,
|
configured_y,
|
||||||
configured_width,
|
configured_width,
|
||||||
configured_height);
|
configured_height,
|
||||||
|
flags,
|
||||||
|
gravity);
|
||||||
}
|
}
|
||||||
|
|
||||||
meta_window_wayland_configure (wl_window, configuration);
|
meta_window_wayland_configure (wl_window, configuration);
|
||||||
|
Loading…
Reference in New Issue
Block a user