mirror of
https://github.com/labwc/labwc.git
synced 2026-02-23 01:40:18 -05:00
layer: move the "locked" check to seat_force_focus_surface()
This commit is contained in:
parent
a277c35c3d
commit
00ad5a03f2
2 changed files with 4 additions and 3 deletions
|
|
@ -23,7 +23,6 @@
|
|||
#include "labwc.h"
|
||||
#include "node.h"
|
||||
#include "output.h"
|
||||
#include "session-lock.h"
|
||||
|
||||
#define LAB_LAYERSHELL_VERSION 4
|
||||
|
||||
|
|
@ -521,12 +520,11 @@ handle_popup_commit(struct wl_listener *listener, void *data)
|
|||
/* Force focus when popup was triggered by IPC */
|
||||
struct server *server = popup->server;
|
||||
struct seat *seat = &server->seat;
|
||||
bool locked = server->session_lock_manager->locked;
|
||||
if (seat->seat->keyboard_state.focused_surface
|
||||
== popup->wlr_popup->parent) {
|
||||
popup->parent_was_focused = true;
|
||||
}
|
||||
if (!locked && popup->wlr_popup->seat) {
|
||||
if (popup->wlr_popup->seat) {
|
||||
struct wlr_layer_surface_v1 *layer_surface =
|
||||
popup->lab_layer_surface->layer_surface;
|
||||
seat_force_focus_surface(seat, layer_surface->surface);
|
||||
|
|
|
|||
|
|
@ -762,6 +762,9 @@ seat_reconfigure(struct server *server)
|
|||
void
|
||||
seat_force_focus_surface(struct seat *seat, struct wlr_surface *surface)
|
||||
{
|
||||
if (seat->server->session_lock_manager->locked) {
|
||||
return;
|
||||
}
|
||||
uint32_t *pressed_sent_keycodes = key_state_pressed_sent_keycodes();
|
||||
int nr_pressed_sent_keycodes = key_state_nr_pressed_sent_keycodes();
|
||||
struct wlr_keyboard *kb = &seat->keyboard_group->keyboard;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue