mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
desktop: simplify interface for view raise/focus
Split desktop_focus_view() into the following two functions: - desktop_focus_and_activate_view() - desktop_raise_view() Always call view_set_activated() rather than using the private set_activated(). This keeps the code cleaner and ensures wlr_foreign_toplevel_handle_v1_set_activated() is called.
This commit is contained in:
parent
70144ac113
commit
9a290feeea
6 changed files with 72 additions and 29 deletions
|
|
@ -182,7 +182,8 @@ process_cursor_motion(struct server *server, uint32_t time)
|
|||
|
||||
if (view && rc.focus_follow_mouse) {
|
||||
if (rc.raise_on_focus) {
|
||||
desktop_focus_view(&server->seat, view);
|
||||
desktop_focus_and_activate_view(&server->seat, view);
|
||||
desktop_raise_view(view);
|
||||
} else {
|
||||
desktop_set_focus_view_only(&server->seat, view);
|
||||
}
|
||||
|
|
@ -384,7 +385,8 @@ cursor_button(struct wl_listener *listener, void *data)
|
|||
}
|
||||
|
||||
/* Handle _press_ on view */
|
||||
desktop_focus_view(&server->seat, view);
|
||||
desktop_focus_and_activate_view(&server->seat, view);
|
||||
desktop_raise_view(view);
|
||||
damage_all_outputs(server);
|
||||
|
||||
if (is_double_click(rc.doubleclick_time)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue