mirror of
https://github.com/swaywm/sway.git
synced 2024-11-30 03:41:27 +00:00
Damage output when views toggle fullscreen
Also add workspace to the transaction when a view maps in fullscreen mode.
This commit is contained in:
parent
50190bc760
commit
e8001e6fbe
|
@ -221,8 +221,11 @@ static void handle_map(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
if (xdg_surface->toplevel->client_pending.fullscreen) {
|
if (xdg_surface->toplevel->client_pending.fullscreen) {
|
||||||
view_set_fullscreen(view, true);
|
view_set_fullscreen(view, true);
|
||||||
|
struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE);
|
||||||
|
arrange_and_commit(ws);
|
||||||
|
} else {
|
||||||
|
arrange_and_commit(view->swayc->parent);
|
||||||
}
|
}
|
||||||
arrange_and_commit(view->swayc->parent);
|
|
||||||
|
|
||||||
xdg_shell_view->commit.notify = handle_commit;
|
xdg_shell_view->commit.notify = handle_commit;
|
||||||
wl_signal_add(&xdg_surface->surface->events.commit,
|
wl_signal_add(&xdg_surface->surface->events.commit,
|
||||||
|
@ -269,7 +272,10 @@ static void handle_request_fullscreen(struct wl_listener *listener, void *data)
|
||||||
view_set_fullscreen(view, e->fullscreen);
|
view_set_fullscreen(view, e->fullscreen);
|
||||||
|
|
||||||
struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE);
|
struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE);
|
||||||
arrange_and_commit(ws);
|
struct sway_transaction *transaction = transaction_create();
|
||||||
|
arrange_windows(ws, transaction);
|
||||||
|
transaction_add_damage(transaction, container_get_box(ws->parent));
|
||||||
|
transaction_commit(transaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
void handle_xdg_shell_surface(struct wl_listener *listener, void *data) {
|
void handle_xdg_shell_surface(struct wl_listener *listener, void *data) {
|
||||||
|
|
|
@ -220,8 +220,11 @@ static void handle_map(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
if (xdg_surface->toplevel->client_pending.fullscreen) {
|
if (xdg_surface->toplevel->client_pending.fullscreen) {
|
||||||
view_set_fullscreen(view, true);
|
view_set_fullscreen(view, true);
|
||||||
|
struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE);
|
||||||
|
arrange_and_commit(ws);
|
||||||
|
} else {
|
||||||
|
arrange_and_commit(view->swayc->parent);
|
||||||
}
|
}
|
||||||
arrange_and_commit(view->swayc->parent);
|
|
||||||
|
|
||||||
xdg_shell_v6_view->commit.notify = handle_commit;
|
xdg_shell_v6_view->commit.notify = handle_commit;
|
||||||
wl_signal_add(&xdg_surface->surface->events.commit,
|
wl_signal_add(&xdg_surface->surface->events.commit,
|
||||||
|
@ -264,7 +267,10 @@ static void handle_request_fullscreen(struct wl_listener *listener, void *data)
|
||||||
view_set_fullscreen(view, e->fullscreen);
|
view_set_fullscreen(view, e->fullscreen);
|
||||||
|
|
||||||
struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE);
|
struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE);
|
||||||
arrange_and_commit(ws);
|
struct sway_transaction *transaction = transaction_create();
|
||||||
|
arrange_windows(ws, transaction);
|
||||||
|
transaction_add_damage(transaction, container_get_box(ws->parent));
|
||||||
|
transaction_commit(transaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) {
|
void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) {
|
||||||
|
|
|
@ -286,8 +286,11 @@ static void handle_map(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
if (xsurface->fullscreen) {
|
if (xsurface->fullscreen) {
|
||||||
view_set_fullscreen(view, true);
|
view_set_fullscreen(view, true);
|
||||||
|
struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE);
|
||||||
|
arrange_and_commit(ws);
|
||||||
|
} else {
|
||||||
|
arrange_and_commit(view->swayc->parent);
|
||||||
}
|
}
|
||||||
arrange_and_commit(view->swayc->parent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_destroy(struct wl_listener *listener, void *data) {
|
static void handle_destroy(struct wl_listener *listener, void *data) {
|
||||||
|
@ -337,7 +340,12 @@ static void handle_request_fullscreen(struct wl_listener *listener, void *data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
view_set_fullscreen(view, xsurface->fullscreen);
|
view_set_fullscreen(view, xsurface->fullscreen);
|
||||||
arrange_and_commit(view->swayc);
|
|
||||||
|
struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE);
|
||||||
|
struct sway_transaction *transaction = transaction_create();
|
||||||
|
arrange_windows(ws, transaction);
|
||||||
|
transaction_add_damage(transaction, container_get_box(ws->parent));
|
||||||
|
transaction_commit(transaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_set_title(struct wl_listener *listener, void *data) {
|
static void handle_set_title(struct wl_listener *listener, void *data) {
|
||||||
|
|
Loading…
Reference in a new issue