xwayland: make behavior more like xdg toplevels

- float fixed size xwayland windows by default
- align configure handling with that of xdg toplevel views
This commit is contained in:
Bonicgamer
2020-10-22 13:22:54 -04:00
committed by GitHub
parent e179690a9c
commit 79dc9cc49a
3 changed files with 37 additions and 14 deletions

View File

@ -195,6 +195,7 @@ fn handleMap(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
if (wlr_xdg_toplevel.parent != null or has_fixed_size) {
// If the toplevel has a parent or has a fixed size make it float
view.current.float = true;
view.pending.float = true;
view.pending.box = view.float_box;
} else {
@ -259,15 +260,7 @@ fn handleCommit(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
// If this commit is in response to our configure and the
// transaction code is tracking this configure, notify it.
// Otherwise, apply the pending state immediately.
view.pending_serial = null;
if (view.shouldTrackConfigure())
view.output.root.notifyConfigured()
else {
const view_tags_changed = view.pending.tags != view.current.tags;
view.current = view.pending;
view.commitOpacityTransition();
if (view_tags_changed) view.output.sendViewTags();
}
view.notifyConfiguredOrApplyPending();
} else {
// If the client has not yet acked our configure, we need to send a
// frame done event so that it commits another buffer. These