wayland: avoid misclassifying WINGs toplevels as dialogs
This commit is contained in:
parent
74a4314621
commit
6fa2c78c2e
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
/* Forward declarations for functions defined in other wl_*.c files */
|
||||
extern void W_UnregisterBacking(unsigned long id);
|
||||
extern W_View *W_GetViewForWindow(WNativeWindow id);
|
||||
void view_attach_scene_destroy_listener(struct wl_toplevel_view *view);
|
||||
void wl_pointer_warp_to(int x, int y);
|
||||
void wm_dock_app_add(struct wl_toplevel_view *v);
|
||||
|
|
@ -240,7 +241,12 @@ handle_toplevel_map(struct wl_listener *listener, void *data)
|
|||
if (app_id_check && strcmp(app_id_check, "WINGs") == 0) {
|
||||
struct wl_frame_buf *_fb, *_next;
|
||||
wl_list_for_each_safe(_fb, _next, &wl_state.frame_list, link) {
|
||||
if (_fb->id >= 0x20000000 && !wl_find_view_by_id(_fb->id)) {
|
||||
/* WINGs view windows and synthetic backing IDs both live in the
|
||||
* 0x20000000+ range. A regular WINGs toplevel (like WPrefs) is
|
||||
* already present in the view table by the time it maps, while a
|
||||
* pre-created dialog backing from wl_client_reparent is not.
|
||||
* Only steal the id for the latter case. */
|
||||
if (_fb->id >= 0x20000000 && !W_GetViewForWindow(_fb->id)) {
|
||||
/* Stale WINGs frame_buf from a previous session — clean it
|
||||
* up if its scene buffer was auto-destroyed (parent tree was
|
||||
* destroyed, cascade nulled the pointer) or if the parent
|
||||
|
|
|
|||
Loading…
Reference in New Issue