mirror of
https://github.com/labwc/labwc.git
synced 2026-02-23 01:40:18 -05:00
view: add move_to_front to struct view_impl
...to increase xwayland and xdg-shell encapsulation and to avoid passing a function pointer as an argument in `xwayland_move_sub_views_to_front()` which is inconsistent with labwc design patterns. Rename view-impl.c to view-impl-common.c Move function declarations that are common to view-implementations from view.h into view-impl-common.h
This commit is contained in:
parent
440372c2da
commit
b8ec5a3e2e
10 changed files with 74 additions and 55 deletions
|
|
@ -12,25 +12,16 @@
|
|||
#include "workspaces.h"
|
||||
#include "xwayland.h"
|
||||
|
||||
static void
|
||||
move_to_front(struct view *view)
|
||||
{
|
||||
wl_list_remove(&view->link);
|
||||
wl_list_insert(&view->server->views, &view->link);
|
||||
wlr_scene_node_raise_to_top(&view->scene_tree->node);
|
||||
}
|
||||
|
||||
void
|
||||
desktop_move_to_front(struct view *view)
|
||||
{
|
||||
if (!view) {
|
||||
return;
|
||||
}
|
||||
move_to_front(view);
|
||||
#if HAVE_XWAYLAND
|
||||
xwayland_move_sub_views_to_front(view, move_to_front);
|
||||
#endif
|
||||
cursor_update_focus(view->server);
|
||||
if (view->impl->move_to_front) {
|
||||
view->impl->move_to_front(view);
|
||||
cursor_update_focus(view->server);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue