mirror of
https://github.com/labwc/labwc.git
synced 2025-11-30 06:59:52 -05:00
wlr-foreign: set all initial states correctly
Two were missing: "minimized" and "activated". At least "minimized" can be set before map, so the initial state needs to be read and set on the foreign-toplevel. I think in the current code, the foreign-toplevel is always created before a view is activated, but for future-proofing, let's not rely on this, and set "activated" as well. There's no harm since wlroots optimizes away any redundant state changes.
This commit is contained in:
parent
077a5c970a
commit
20087e89b2
1 changed files with 5 additions and 2 deletions
|
|
@ -199,9 +199,12 @@ wlr_foreign_toplevel_init(struct wlr_foreign_toplevel *wlr_toplevel,
|
||||||
/* These states may be set before the initial map */
|
/* These states may be set before the initial map */
|
||||||
handle_new_app_id(&wlr_toplevel->on_view.new_app_id, NULL);
|
handle_new_app_id(&wlr_toplevel->on_view.new_app_id, NULL);
|
||||||
handle_new_title(&wlr_toplevel->on_view.new_title, NULL);
|
handle_new_title(&wlr_toplevel->on_view.new_title, NULL);
|
||||||
handle_maximized(&wlr_toplevel->on_view.maximized, NULL);
|
|
||||||
handle_fullscreened(&wlr_toplevel->on_view.fullscreened, NULL);
|
|
||||||
handle_new_outputs(&wlr_toplevel->on_view.new_outputs, NULL);
|
handle_new_outputs(&wlr_toplevel->on_view.new_outputs, NULL);
|
||||||
|
handle_maximized(&wlr_toplevel->on_view.maximized, NULL);
|
||||||
|
handle_minimized(&wlr_toplevel->on_view.minimized, NULL);
|
||||||
|
handle_fullscreened(&wlr_toplevel->on_view.fullscreened, NULL);
|
||||||
|
handle_activated(&wlr_toplevel->on_view.activated,
|
||||||
|
&(bool){view == view->server->active_view});
|
||||||
|
|
||||||
/* Client side requests */
|
/* Client side requests */
|
||||||
CONNECT_SIGNAL(wlr_toplevel->handle, &wlr_toplevel->on, request_maximize);
|
CONNECT_SIGNAL(wlr_toplevel->handle, &wlr_toplevel->on, request_maximize);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue