Skip to content

Commit

Permalink
可以解决(djpohly#235 点击popup crash问题,但client移动时,比如平铺到Mono,input Popup 没能跟着动
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed May 24, 2022
1 parent 5d8fbd1 commit 79fd6df
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dwl.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
/* enums */
enum { CurNormal, CurMove, CurResize }; /* cursor */
enum { XDGShell, LayerShell, X11Managed, X11Unmanaged }; /* client types */
enum { LyrBg, LyrBottom, LyrTop, LyrOverlay, LyrTile, LyrFloat, LyrNoFocus, NUM_LAYERS }; /* scene layers */
enum { LyrBg, LyrBottom, LyrTop, LyrOverlay, LyrTile, LyrFloat, LyrIMEPopup,LyrNoFocus, NUM_LAYERS }; /* scene layers */
#ifdef XWAYLAND
enum { NetWMWindowTypeDialog, NetWMWindowTypeSplash, NetWMWindowTypeToolbar,
NetWMWindowTypeUtility, NetLast }; /* EWMH atoms */
Expand Down Expand Up @@ -2413,7 +2413,7 @@ static void handle_im_popup_map(struct wl_listener *listener, void *data) {
struct dwl_input_popup *popup =
wl_container_of(listener, popup, popup_map);

popup->scene = &wlr_scene_tree_create(layers[LyrFloat])->node;
popup->scene = &wlr_scene_tree_create(layers[LyrIMEPopup])->node;
popup->scene_surface = wlr_scene_subsurface_tree_create(popup->scene,
popup->popup_surface->surface);
popup->scene_surface->data = popup;
Expand Down Expand Up @@ -2581,8 +2581,11 @@ setup(void)
layers[LyrFloat] = &wlr_scene_tree_create(&scene->node)->node;
layers[LyrTop] = &wlr_scene_tree_create(&scene->node)->node;
layers[LyrOverlay] = &wlr_scene_tree_create(&scene->node)->node;
layers[LyrIMEPopup] = &wlr_scene_tree_create(&scene->node)->node;

layers[LyrNoFocus] = &wlr_scene_tree_create(&scene->node)->node;


/* Create a renderer with the default implementation */
if (!(drw = wlr_renderer_autocreate(backend)))
die("couldn't create renderer");
Expand Down

0 comments on commit 79fd6df

Please sign in to comment.