osd: allow clicking an osd item to focus the window

This commit is contained in:
tokyo4j 2025-10-30 03:22:45 +09:00 committed by Johan Malm
parent 00f0a46ef7
commit 9197eb468a
9 changed files with 55 additions and 1 deletions

View file

@ -30,6 +30,7 @@
#include "labwc.h"
#include "layers.h"
#include "menu/menu.h"
#include "osd.h"
#include "output.h"
#include "resistance.h"
#include "resize-outlines.h"
@ -1190,6 +1191,12 @@ cursor_process_button_release(struct seat *seat, uint32_t button,
}
return notify;
}
if (server->input_mode == LAB_INPUT_STATE_WINDOW_SWITCHER) {
if (ctx.type == LAB_NODE_OSD_ITEM) {
osd_on_cursor_release(server, ctx.node);
}
return notify;
}
if (server->input_mode != LAB_INPUT_STATE_PASSTHROUGH) {
return notify;