https://bugs.kde.org/show_bug.cgi?id=518376

            Bug ID: 518376
           Summary: Popup windows of zwlr_layer_shell windows do not
                    follow xdg_positioner constraints correctly.
    Classification: Plasma
           Product: kwin
      Version First 6.6.3
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: wayland-generic
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 191165
  --> https://bugs.kde.org/attachment.cgi?id=191165&action=edit
comparison between xgd_toplevel's popup and zwlr_layer_shell's popup

SUMMARY

Wayland clients who use the zwlr_layer_shell extension to anchor windows lose
the functionality of xdg_positioner with popup windows.

For instance: a window using ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM who spawns a
popup window will have the popup window appear off screen. (see the attached
screenshot)

STEPS TO REPRODUCE
1. Create window using zwlr_layer_shell:
zwlr_layer_surface_v1_set_anchor(wlr_surface,
ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM 
                                                                               
 | ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT 
                                                                               
 | ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT);
zwlr_layer_surface_v1_set_exclusive_zone(wlr_surface, height);

2. Spawn a popup window whose parent is the zwlr_layer_shell surface using an
xdg_positioner:
xdg_positioner = xdg_wm_base_create_positioner(wm()->wl->xdg_base);
xdg_positioner_set_anchor_rect(xdg_positioner, desc->x, desc->y,
desc->anchor_w, desc->anchor_h);
xdg_positioner_set_size(xdg_positioner, desc->w, desc->h);
xdg_positioner_set_anchor(xdg_positioner, XDG_POSITIONER_ANCHOR_BOTTOM_LEFT);
xdg_positioner_set_gravity(xdg_positioner,
XDG_POSITIONER_GRAVITY_BOTTOM_RIGHT);
xdg_positioner_set_constraint_adjustment(xdg_positioner,
XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_Y);


OBSERVED RESULT
Popup window appears below the bottom of the screen. See attached screenshot.

EXPECTED RESULT
Popup window appears above the anchor as specified in the xdg_positioner
settings. See attached screenshot.

The xdg_toplevel.png screenshot shows the same window created as a toplevel
instead showing the expected behavior. Additionally, I tested on Hyprland and
saw the behavior I expected.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 6.6.3
KDE Frameworks Version: 6.24.0
Qt Version: 6.11.0
Kernel: 6.19.10-arch1-1 (64-bit)

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to