mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
Adjust xdg-shell view position on first map
This commit is contained in:
parent
0eb64a29aa
commit
6e0d11bff5
5 changed files with 50 additions and 35 deletions
|
|
@ -49,11 +49,12 @@ void xdg_toplevel_decoration(struct wl_listener *listener, void *data)
|
|||
|
||||
void xdg_surface_map(struct wl_listener *listener, void *data)
|
||||
{
|
||||
/* Called when the surface is mapped, or ready to display on-screen. */
|
||||
struct view *view = wl_container_of(listener, view, map);
|
||||
view->mapped = true;
|
||||
view->been_mapped = true;
|
||||
view->surface = view->xdg_surface->surface;
|
||||
if (!view->been_mapped)
|
||||
view_init_position(view);
|
||||
view->been_mapped = true;
|
||||
view_focus(view);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue