mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-03-09 05:34:27 -04:00
view: add proper abstraction with interface
This commit is contained in:
parent
24517922cc
commit
64b971a665
7 changed files with 201 additions and 121 deletions
11
seat.c
11
seat.c
|
|
@ -27,6 +27,9 @@
|
|||
#include "seat.h"
|
||||
#include "server.h"
|
||||
#include "view.h"
|
||||
#if CAGE_HAS_XWAYLAND
|
||||
#include "xwayland.h"
|
||||
#endif
|
||||
|
||||
static void drag_icon_update_position(struct cg_drag_icon *drag_icon);
|
||||
|
||||
|
|
@ -707,9 +710,11 @@ seat_set_focus(struct cg_seat *seat, struct cg_view *view)
|
|||
}
|
||||
|
||||
#if CAGE_HAS_XWAYLAND
|
||||
if (view->type == CAGE_XWAYLAND_VIEW &&
|
||||
!wlr_xwayland_or_surface_wants_focus(view->xwayland_surface)) {
|
||||
return;
|
||||
if (view->type == CAGE_XWAYLAND_VIEW) {
|
||||
struct cg_xwayland_view *xwayland_view = xwayland_view_from_view(view);
|
||||
if (!wlr_xwayland_or_surface_wants_focus(xwayland_view->xwayland_surface)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue