mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
xdg-shell: rename wlr_xdg_toplevel.added to sent_initial_configure
This is more descriptive, and avoids the confusion with wlr_xdg_surface.added.
This commit is contained in:
parent
e1a1dc4be5
commit
df0c926a7a
2 changed files with 4 additions and 4 deletions
|
@ -172,7 +172,7 @@ struct wlr_xdg_toplevel_requested {
|
||||||
struct wlr_xdg_toplevel {
|
struct wlr_xdg_toplevel {
|
||||||
struct wl_resource *resource;
|
struct wl_resource *resource;
|
||||||
struct wlr_xdg_surface *base;
|
struct wlr_xdg_surface *base;
|
||||||
bool added;
|
bool sent_initial_configure;
|
||||||
|
|
||||||
struct wlr_xdg_toplevel *parent;
|
struct wlr_xdg_toplevel *parent;
|
||||||
struct wl_listener parent_unmap;
|
struct wl_listener parent_unmap;
|
||||||
|
|
|
@ -132,11 +132,11 @@ void handle_xdg_toplevel_committed(struct wlr_xdg_toplevel *toplevel) {
|
||||||
|
|
||||||
toplevel->current = toplevel->pending;
|
toplevel->current = toplevel->pending;
|
||||||
|
|
||||||
if (!toplevel->added) {
|
if (!toplevel->sent_initial_configure) {
|
||||||
// on the first commit, send a configure request to tell the client it
|
// on the first commit, send a configure request to tell the client it
|
||||||
// is added
|
// is added
|
||||||
wlr_xdg_surface_schedule_configure(toplevel->base);
|
wlr_xdg_surface_schedule_configure(toplevel->base);
|
||||||
toplevel->added = true;
|
toplevel->sent_initial_configure = true;
|
||||||
|
|
||||||
if (toplevel->base->client->shell->version >=
|
if (toplevel->base->client->shell->version >=
|
||||||
XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION) {
|
XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION) {
|
||||||
|
@ -535,7 +535,7 @@ void unmap_xdg_toplevel(struct wlr_xdg_toplevel *toplevel) {
|
||||||
toplevel->requested.maximized = false;
|
toplevel->requested.maximized = false;
|
||||||
toplevel->requested.minimized = false;
|
toplevel->requested.minimized = false;
|
||||||
|
|
||||||
toplevel->added = false;
|
toplevel->sent_initial_configure = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void destroy_xdg_toplevel(struct wlr_xdg_toplevel *toplevel) {
|
void destroy_xdg_toplevel(struct wlr_xdg_toplevel *toplevel) {
|
||||||
|
|
Loading…
Reference in a new issue