mirror of
https://github.com/labwc/labwc.git
synced 2026-02-24 01:40:15 -05:00
implement input_inhibit protocol, needed for swaylock
this is in "it appears to work" state, though I blindly copy-pasted a little more code than I'm happy with, so might benefit from a review
This commit is contained in:
parent
65f5bf189d
commit
39b1d92f9b
7 changed files with 212 additions and 8 deletions
|
|
@ -76,6 +76,9 @@ desktop_set_focus_view_only(struct seat *seat, struct view *view)
|
|||
if (!view || view->minimized || !view->mapped) {
|
||||
return;
|
||||
}
|
||||
if(input_inhibit_blocks_surface(seat, view->surface->resource))
|
||||
return;
|
||||
|
||||
struct wlr_surface *prev_surface;
|
||||
prev_surface = seat->seat->keyboard_state.focused_surface;
|
||||
if (prev_surface == view->surface) {
|
||||
|
|
@ -96,6 +99,9 @@ desktop_focus_view(struct seat *seat, struct view *view)
|
|||
seat_focus_surface(seat, NULL);
|
||||
return;
|
||||
}
|
||||
if(input_inhibit_blocks_surface(seat, view->surface->resource))
|
||||
return;
|
||||
|
||||
if (view->minimized) {
|
||||
/* this will unmap and then focus */
|
||||
view_minimize(view, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue