e.g., open an editor from a terminal, minimize it, then hit ^C in the terminal
simply don't unmap xdg or xwayland views if they are not currently marked as mapped
When a window title changed dynamically (for example when running
"cd" within an xfce4-terminal), the titlebar did not immediately
update to show the new title. (The titlebar would update as soon
as the mouse cursor moved.)
...and replace with a local MAX macro, because:
- They contain a ({}) construct which is a GNU extension and that's
against Drew's coding style
- min() is not used anyway
- MAX() clashes with cairo's macro, so best to not add this in labwc.h
Split desktop_focus_view() into the following two functions:
- desktop_focus_and_activate_view()
- desktop_raise_view()
Always call view_set_activated() rather than using the private
set_activated(). This keeps the code cleaner and ensures
wlr_foreign_toplevel_handle_v1_set_activated() is called.
...and take into account output layout co-ordinates.
Previously xdg-shell views were just positioned at (0, 0) on first map
regardless of output co-ordinates.
Fix issue #39
src/xdg.c:269:48: error: no member named 'subsurfaces' in 'struct wlr_surface'
wl_list_for_each(subsurface, &view->surface->subsurfaces,
~~~~~~~~~~~~~ ^
/usr/include/wayland-util.h:443:30: note: expanded from macro 'wl_list_for_each'
for (pos = wl_container_of((head)->next, pos, member); \
^~~~
/usr/include/wayland-util.h:409:32: note: expanded from macro 'wl_container_of'
(__typeof__(sample))((char *)(ptr) - \
^~~
Based on 3162766eef
Some xdg-shell applications remember the (un)maximized states when last
closed. We could honour this state, but it makes the code cumbersome
regarding padding and position. Prefer to keep it simple.
src/xdg.c:180:2: warning: implicit declaration of function 'wlr_xdg_surface_for_each_popup' is invalid in C99 [-Wimplicit-function-declaration]
wlr_xdg_surface_for_each_popup(view->xdg_surface, iterator, data);
^
ld: error: undefined symbol: wlr_xdg_surface_for_each_popup
>>> referenced by xdg.c:180 (src/xdg.c:180)
>>> labwc.p/src_xdg.c.o:(xdg_toplevel_view_for_each_popup)
Based on 5438cc158a