QB64Team / qb64

BASIC for the modern era.
https://www.qb64.org
Other
668 stars 94 forks source link

Tiling window managers and vibrating windows #162

Closed hildred closed 3 years ago

hildred commented 3 years ago

The issue is in 69521e2e7715f2b2768fa29b863b2374d47c2f33 build, and v1.5.

Obviously as this is a X11 issue it only affects Linux builds. (in this case Debian with ratpoison)

In X11 when a window is created its size and position is determined by the window manager (if one is running which is the usual case). Tiling window manages like ratpoison allocate fractions of the screen for windows. If this fraction is not a multiple of the vertical character size qb64 tries to resize, and vibrates.

Steps to reproduce the behavior:

  1. install ratpoison (or another tiling window manager
  2. start a session using it as your window manager
  3. Start qb64
  4. Get Dizzy

Expected behavior A well behaved application should accept the size specified by the window manager. This also applies to the horizontal but that is a different bug.

There is a chance that your monitor is sized such that no vibration happens. this would be the case if the vertical size is a exact multiple of the vertical character size.

ghost commented 3 years ago

I would just use a different X11 application. Different ones behave differently with QB64. My favorite is x410.

ghost commented 3 years ago

Also, this behavior doesn't appear to be unique to QB64. Other users on Debian out on the web report programs shaking when using X11.

flukiluke commented 3 years ago

I must have been getting lucky all these years that I've been using dwm!

I think I see what you mean, QB64 really doesn't like being told it can't resize to an arbitrary window size (as you noted it tries to force a multiple of the character size). The fix is probably to just fill the bottom/right of the window with black.

aouwt commented 3 years ago

That hopefully would also fix the issue where the QB64 window is in the bottom left and the mouse inputs are read from the top left so the mouse inputs are offset a bit

aouwt commented 3 years ago

I can confirm that I get this on Compiz without Window Decorations on, so (just speculating here) may be a problem concerning the fact that I'm using hotkeys to start resizing instead of just clicking and dragging. I never had this problem when I used Compiz with Window Decorations before...

Edit: I found that if you wait for _RESIZE to go to 0, then resize the window, it seems to work a little better.

FellippeHeitor commented 3 years ago

Also, this behavior doesn't appear to be unique to QB64. Other users on Debian out on the web report programs shaking when using X11.

Sounds like a #wontfix scenario.