[BUG] Resize broken since 7.0.6 on Linux

Hello,

On Linux (tested with Debian 11, Wayland), a simple resize of the application window breaks the resize (the getWidth returns a wrong value: almost the double of what it should be. On mouse release, the window gets strangely resized). On Windows and Mac, it works fine.

This happens only since 7.0.6 included (tested up to 7.0.9). It works fine in 7.0.5.

To confirm this, I have build a stripped-down app with basically only a DocumentWindow.

Thanks!

1 Like

Which windowing system are you using specifically (gnome, kde, etc.)? Are you using a scale factor other than 1.0? Do you have multiple displays connected?

Do you see the same thing in any of the JUCE example projects?

I’m not seeing the issue you reported on develop with Fedora 39 with gnome 45.2 and Wayland. I tried the JUCE DemoRunner, AudioPluginDemo standalone, and your example app (this just displays as a black window with a white border and a title bar, is that correct?).

Digging a bit deeper, it looks like JUCE may be sending an incorrect _NET_WM_MOVERESIZE event to initiate a window resize. Currently, the mouse coordinates are specified relative to the application window, but they should be specified relative to the root window. Perhaps this is the cause of the problems you’re seeing.

Interestingly, I had recently starting doing some testing with WSL on Windows, and I noticed that Projucer and my app both seemed to move unexpectedly on occassion. Since I am not pursuing the Linux builds beyond just experimenting, but I wonder if this is the issue I am also seeing.

1 Like

Thanks a lot for investing time into this. I was getting crazy when I could NOT reproduce using JUCE’s demo.

But I’ve found how!!
setUsingNativeTitleBar(false);
is the culprit! As soon as you set it to false, the resize doesn’t work well, even in the JUCE’s demo.

I tested on Gnome and KDE, both fail in the same way. Multiple displays or one don’t matter.

I’ve updated my sample above, simplified the code and used the latest JUCE version, it should fail for you too :slight_smile: .

I hope you’ll be able to reproduce. Thanks again!

I’ve pushed a fix for the coordinate-space issue I mentioned above:

Please try building with JUCE develop and let us know if the problem persists. Thanks!

3 Likes

It is working!! Thanks a lot for your fix and the speed of the correction!

1 Like

Have you found a reason / solution? I am experimenting the same strange window move behaviour (WSL). :frowning:

I can’t recall the status of that. It was about a year ago now, and I was primarily validating I could build my app for Linux.

Hi, it has been corrected, like I mentioned above (it was only happening on Linux).