Gem icon indicating copy to clipboard operation
Gem copied to clipboard

"dimen" and "offset" messages to gemwin have completely unpredictable nonsensical results on multiple displays

Open php4fan opened this issue 2 months ago • 4 comments

Detail

To reproduce:

  • Have two displays, both with 1920x1080 resolution, arranged horizontally one next to each other left to right, the left one being the primary one
  • open the attached patch
  • click on the message that has "....dimen 1920 1080"
  • click on the destroy message
  • click on the message that has "....dimen 1919 1080"

Expected: Both should open the borderless window in the second (right) screen, starting exactly at the pixel 0,0 of the second screen, with a height that fills the screen exactly. The first one should fill the width of the screen exactly too; the second one should leave just one pixel to the right.

Observed: Utter chaos. The first message opens the window on the first (left) screen, as if it had had "offset 0 0". The second message opens the window on the second screen and it does seem to leave 1 pixel on the right (at least it's roughly 1 pixel) but it also leaves a considerable space on the bottom, about 43 pixel in height. That is, either the window is not 1080 in height but about 1036, or it has a negative vertical offset of about -43px.

I'm not sure if that's a coincidence, but those about 43 pixels are exactly the hight of the Task Manager bar that exists at the bottom of the LEFT screen, NOT the right one. It's like the window is trying to avoid a task manager that is not there. That doesn't explain why it goes entirely to the left screen when the width of the window is not at least 1px less that the width of the screen, and also note that when it does go to the left (and also if you create the window with offset 0 0) it does fill the whole left screen including the bottom area covering the Task Manager, that is, it doesn't seem to have any trouble with the Task Manager when it is actually there.

Basically nothing makes any sense.

Image

MAIN.pd.zip

Gem Version

a4a7bf0

Pd Version

0.56.1

Operating System

Linux

OS Version

Manjaro / KDE / X11

Which CPU are you using?

amd64/x86_64 ("64bit Intel")

php4fan avatar Sep 11 '25 20:09 php4fan

which windowing backend ([gemdefaultwindow]) are you using?

umlaeute avatar Sep 11 '25 21:09 umlaeute

gemglfw3window

php4fan avatar Sep 11 '25 22:09 php4fan

This seems to be a bug in glfw. I was able to reproduce it from scratch on one of their examples:

https://github.com/glfw/glfw/issues/2770

php4fan avatar Sep 14 '25 16:09 php4fan

thanks for checking (I was going to test your problem on my dual-screen setup on Monday, but I guess this is obsolete now)

umlaeute avatar Sep 14 '25 17:09 umlaeute