New windows are overly large - Linux - Aseprite 1.3 beta1-4

so this is an issue on a multi-monitor multi resolution setup 2x 1920x1080 monitors and an 2560x1440p
what ever call aseprite is using to get the resolution of my monitor/desktop is returning a resolution of 6400x1440 leading to buggy/unintended behavior of new window/dialog creation

Windows which have a defined size like the preference window or layer properties window work fine

the file dialog and pallet selection dialogs scale in proportion to the resolution of the desktop(6400x1440
meaning buttons and controls are cut off in non visible/accessible spaces of the display and spans across all three monitors

my recommended fix would be to have newly created windows/dialogs be generated based on the size of the window/dialog that spawned them down to a minimal required size for the dialog to be functional and positioned with in the bounds of the original window if possible

i’m running on Ubuntu 20.04
with an nVidia 2080 gpu

Hi @DriftonAloft :wave: What Window Manager (WM) is Ubuntu 20.04 using? Or are you using a custom WM? Do you have a DPI-scaling setting?

Actually the default size for most windows should be the minimal required size for that window (this is something that doesn’t depend on the platform). But the problem is that some platforms (Linux), and some Window Managers can give some problems (or we are not taking care of a specific DPI-scaling setting).

The specific details are quite boring and too dev-specific (one possibility that I suspect is how we use frame extents to remove the native frame of the WM, and that those frame extents must be informed correctly by the WM).

sorry about the delay, i’m using the default gnome WM on ubuntu 20.04 i haven’t tried in any other WM yet, no DPI Scaling, the windows do mostly fit onto the 2560x1440 monitor but the dialogs still tend to extend to the right of the screen and stuff gets cut off in the bottom corner i know my monitor set up isn’t common, and thank you for the great program

here is an example of what happens

I started seeing what might be causing this issue, and here some explanation (in this case for palette popup):

  • When we open the palette popup, it tries to use some space of the “workarea” (width/2, height*2/3)
  • That “workarea” is given by a fit_bounds() function
  • On Linux/X11, fit_bounds() gets the workarea from the _NET_WORKAREA property of the root window, which it looks like includes the workarea of all monitors/screens (because the property doesn’t depend on a specific screen). I think here is the issue in our case, we should get the workarea of one specific screen in this case (as it does on Windows and macOS).
1 Like