Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Some applications with minimum value restrictions refuse to resize the window size, resulting in layout chaos. #499

Closed
DreamMaoMao opened this issue Oct 15, 2023 · 5 comments
Labels
A: bug Something isn't working

Comments

@DreamMaoMao
Copy link

DreamMaoMao commented Oct 15, 2023

Info

dwl version: v0.4-60-gab87410-dirty

wlroots version: 0.16.2

Description

swappy-20231015-122150

This phenomenon is currently observed in blueman and obs, where their window widths have minimum value restrictions, but they can be forced to resize to preset window sizes in the sway wm.

Can anyone suggest a solution? How to force these applications with window size restrictions to draw to a preset size in dwl

@DreamMaoMao DreamMaoMao added the A: bug Something isn't working label Oct 15, 2023
@sevz17
Copy link
Collaborator

sevz17 commented Oct 15, 2023

Right, we need to improve the handling of size hints.

The problem is that some (most?) applications that ported their code to wayland (also X11 apps) do not resize when they are told to, and there are other that comply with the protocol and do it, so in order to do not have problems with the broken applications, dwl respects size hints for all clients.

@DreamMaoMao
Copy link
Author

@sevz17

i try to ignore size hints for thoese clients,but they still refuse to resize.

Is there a more general way, for example, we just send a resize request to the client, but regardless of whether the client resizes its own window size, we just display our default client area size (with the upper-left coordinate as the origin). I feel like swaywm and hyprland are both taking this approach, but I'm not sure.

@DreamMaoMao
Copy link
Author

I haven't written interface rendering code before, so I don't quite understand the logic of sway in this part.

@sevz17
Copy link
Collaborator

sevz17 commented Oct 15, 2023

There is a way, but it's not merged in wlroots yet: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4131

I haven't written interface rendering code before, so I don't quite understand the logic of sway in this part.

dwl uses the scene-graph api, we let wlroots do the rendering stuff. And because of that we cannot fully control how buffers are rendered

EDIT: dwl patch using the wlroots' patch of above: #455

@sevz17
Copy link
Collaborator

sevz17 commented Oct 15, 2023

Duplicate of #411.

@sevz17 sevz17 closed this as completed Oct 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants