mirror of
https://github.com/labwc/labwc.git
synced 2025-11-07 13:30:06 -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
|
|
@ -365,7 +365,6 @@ void foreign_toplevel_update_outputs(struct view *view);
|
|||
* cannot assume this means that the window actually has keyboard
|
||||
* or pointer focus, in this compositor are they called together.
|
||||
*/
|
||||
|
||||
void desktop_move_to_front(struct view *view);
|
||||
void desktop_move_to_back(struct view *view);
|
||||
void desktop_focus_and_activate_view(struct seat *seat, struct view *view);
|
||||
|
|
|
|||
14
include/view-impl-common.h
Normal file
14
include/view-impl-common.h
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef __LABWC_VIEW_IMPL_COMMON_H
|
||||
#define __LABWC_VIEW_IMPL_COMMON_H
|
||||
/*
|
||||
* Common code for view->impl functions
|
||||
*
|
||||
* Please note: only xdg-shell-toplevel-view and xwayland-view view_impl
|
||||
* functions should call these functions.
|
||||
*/
|
||||
|
||||
void view_impl_move_to_front(struct view *view);
|
||||
void view_impl_map(struct view *view);
|
||||
|
||||
#endif /* __LABWC_VIEW_IMPL_COMMON_H */
|
||||
|
|
@ -30,6 +30,7 @@ struct view_impl {
|
|||
void (*set_fullscreen)(struct view *view, bool fullscreen);
|
||||
void (*unmap)(struct view *view);
|
||||
void (*maximize)(struct view *view, bool maximize);
|
||||
void (*move_to_front)(struct view *view);
|
||||
};
|
||||
|
||||
struct view {
|
||||
|
|
@ -162,7 +163,6 @@ void view_update_title(struct view *view);
|
|||
void view_update_app_id(struct view *view);
|
||||
void view_reload_ssd(struct view *view);
|
||||
|
||||
void view_impl_map(struct view *view);
|
||||
void view_adjust_size(struct view *view, int *w, int *h);
|
||||
|
||||
void view_evacuate_region(struct view *view);
|
||||
|
|
|
|||
|
|
@ -45,8 +45,6 @@ void xwayland_unmanaged_create(struct server *server,
|
|||
struct wlr_xwayland_surface *xwayland_surface_from_view(struct view *view);
|
||||
|
||||
bool xwayland_apply_size_hints(struct view *view, int *w, int *h);
|
||||
void xwayland_move_sub_views_to_front(struct view *parent,
|
||||
void (*move_to_front)(struct view *view));
|
||||
|
||||
void xwayland_server_init(struct server *server,
|
||||
struct wlr_compositor *compositor);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue