mirror of
https://github.com/labwc/labwc.git
synced 2026-02-07 04:07:42 -05:00
view: Add view_move_to_front/back().
This avoids calling view->impl functions from cursor.c and desktop.c. v2: Add an explicit recursion guard in cursor_update_focus().
This commit is contained in:
parent
12f3314595
commit
d7dd366bad
11 changed files with 52 additions and 43 deletions
20
src/view.c
20
src/view.c
|
|
@ -982,6 +982,26 @@ view_snap_to_region(struct view *view, struct region *region,
|
|||
view_apply_region_geometry(view);
|
||||
}
|
||||
|
||||
void
|
||||
view_move_to_front(struct view *view)
|
||||
{
|
||||
assert(view);
|
||||
if (view->impl->move_to_front) {
|
||||
view->impl->move_to_front(view);
|
||||
cursor_update_focus(view->server);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
view_move_to_back(struct view *view)
|
||||
{
|
||||
assert(view);
|
||||
if (view->impl->move_to_back) {
|
||||
view->impl->move_to_back(view);
|
||||
cursor_update_focus(view->server);
|
||||
}
|
||||
}
|
||||
|
||||
const char *
|
||||
view_get_string_prop(struct view *view, const char *prop)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue