Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

non-resizable windows can be resized

Open brainlessbitch opened this issue 1 year ago • 11 comments

Hyprland Version

System/Version info
Hyprland, built from branch main at commit c51b3fb06f48657bcf66a92eca3de04066a9c8ef dirty (events: ignore sending mouse enter to focused if a constraint is active).
Date: Tue Jan 30 08:24:41 2024
Tag: v0.34.0-84-gc51b3fb0

flags: (if any)


System Information:
System name: Linux
Node name: warren
Release: 6.7.2-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Fri, 26 Jan 2024 19:10:20 +0000


GPU information: 
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 620 [8086:5917] (rev 07) (prog-if 00 [VGA controller])


os-release: NAME="OccultOS"
PRETTY_NAME="OccultOS"
ID="occultos"
ID_LIKE="arch"
ANSI_COLOR="1;0"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
LOGO="occultos"


plugins:

Bug or Regression?

Bug

Description

windows that shouldn't be resizable are still resizable inward, more specifically gtk windows with resizable: false

How to reproduce

use a gtk application that shouldn't be resizable or run this python and try resizing inward

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk

def on_destroy(widget):
    Gtk.main_quit()

def main():
    Gtk.init()

    window = Gtk.Window()
    window.set_default_size(250, 250)
    window.set_resizable(False)

    window.connect("destroy", on_destroy)

    window.show_all()

    Gtk.main()

if __name__ == "__main__":
    main()

Crash reports, logs, images, videos

No response

brainlessbitch avatar Feb 02 '24 01:02 brainlessbitch

set minsize and maxsize to the same size.

set_resizable is most likely x11 only

vaxerski avatar Feb 02 '24 01:02 vaxerski

i can't set minsize/maxsize on all windows that shouldn't be resized, and resizable works on other wayland compositors

brainlessbitch avatar Feb 02 '24 01:02 brainlessbitch

mhm, including sway?

I'll ask for a WAYLAND_DEBUG then from the app.

vaxerski avatar Feb 02 '24 01:02 vaxerski

never tested on sway, but on river and wayfire it works as expected

WAYLAND_DEBUG dumps a lot of info, anything specific i should be looking for?

brainlessbitch avatar Feb 02 '24 01:02 brainlessbitch

post entire thang (attach)

vaxerski avatar Feb 02 '24 02:02 vaxerski

here debug.txt

brainlessbitch avatar Feb 02 '24 02:02 brainlessbitch

[2288234.228]  -> [email protected]_min_size(250, 250)
[2288234.243]  -> [email protected]_max_size(250, 250)

mhm so it does exactly that.

I assume you can't resize past the size? Now that I think about it I think we check max but not min size

vaxerski avatar Feb 02 '24 02:02 vaxerski

that would explain it

brainlessbitch avatar Feb 02 '24 02:02 brainlessbitch

seems like something's changed, you can still resize inward, but now if you stop resizing it'll snap back to the specified size

brainlessbitch avatar Feb 06 '24 01:02 brainlessbitch

image

snap back to reality

vaxerski avatar Feb 06 '24 01:02 vaxerski

lol

brainlessbitch avatar Feb 06 '24 01:02 brainlessbitch

i have a development, this doesn't just apply to gtk windows, sdl windows that have fixed size can also still be resized, other compositors eg. wayfire and sway don't have this issue. is there possibly something that those compositors are getting that hyprland is not

brainlessbitch avatar Mar 19 '24 21:03 brainlessbitch

this should be fixed on latest hyprland.

vaxerski avatar Mar 20 '24 01:03 vaxerski

well its definitely working on gtk windows, but there's also a slightly related but also different issue with sdl windows

brainlessbitch avatar Mar 20 '24 02:03 brainlessbitch

and you won't be so nice to explain what the issue is?

vaxerski avatar Mar 20 '24 02:03 vaxerski

well it seems to be that the window has a set width and height, it's not non-resizable but it instead has a forced specific width and height which should prevent it from being resized

brainlessbitch avatar Mar 20 '24 02:03 brainlessbitch

wat?

vaxerski avatar Mar 20 '24 17:03 vaxerski

https://github.com/hyprwm/Hyprland/assets/102400503/b597b781-015e-4c0c-8451-503be354c8c7

https://github.com/hyprwm/Hyprland/assets/102400503/f239b398-77b2-4e14-a3d6-503526b716f3

first one is wayfire, second is hyprland, these are sdl windows that have a set size and resizable is false, but as you can see on hyprland the window can still be resized

brainlessbitch avatar Mar 21 '24 16:03 brainlessbitch

the game doesn't set itself as non-resizable properly then, and it's the game's fault. You can see wf glitching out too, fwiw

vaxerski avatar Mar 21 '24 18:03 vaxerski

not a game, and how tf am i supposed to set the size then, sdl only has a few options for setting size and none of them work on hl

brainlessbitch avatar Mar 21 '24 18:03 brainlessbitch

set minsize and maxsize to the same size. If SDL doesn't know how to do this, complain to SDL.

"Force size" does not exist on wayland.

vaxerski avatar Mar 21 '24 18:03 vaxerski

interesting, thanks

brainlessbitch avatar Mar 21 '24 18:03 brainlessbitch

would it be possible to add a noresize window rules or smthn?

brainlessbitch avatar Mar 21 '24 19:03 brainlessbitch

minsize and maxsize exist

vaxerski avatar Mar 21 '24 19:03 vaxerski

yes, but that's not really the same, i could have two windows under the same class with radically different sizes

brainlessbitch avatar Mar 21 '24 19:03 brainlessbitch

then no

vaxerski avatar Mar 21 '24 19:03 vaxerski

hm, okay

brainlessbitch avatar Mar 21 '24 19:03 brainlessbitch