Gem
Gem copied to clipboard
Wayland: The platform does not support setting the window position
Detail
On Wayland, when creating the gemwin, you systematically get this message:
Wayland: The platform does not support setting the window position
and [border 0( and [offset ...( have no effect whatsoever.
I know that is a limitation of Wayland (I'll never understand how they thought that was remotely ok, and X11 is already practically abandoned, or at least X11 support on major desktop environments), but XWayland does allow setting window position and IIANM borderless windows too.
Shouldn't Gem maybe use XWayland? Or allow to choose? I can't see how one can use Gem in any serious performance setting without the ability to make a borderless window at a given exact offset (think e.g. patch on one screen and output on two other screens), unless one manually moves the window every single time, carefully positioning it so that the border falls outside of the "output" screen.
I assumed there would be something about this in the documentation, but I grepped the entire repository for "wayland" and found nothing.
Gem Version
git-5117524
Pd Version
0.55-2
Operating System
Linux
OS Version
Manjaro / KDE / Wayland
Which CPU are you using?
amd64/x86_64 ("64bit Intel")
Gem doesn't know about Wayland at all.
[gemglxwindow] obviously uses GLX, and is bound to X11.
but the default shall be [gemglfw3window] which uses GLFW3. in which case Gem doesn't know anything about X11 or Wayland or whatnot.
so I'm pretty sure this is not fixable on our side.
you might want to check out if the issue is really related to glfw, and if so report an issue there
Thank you!
With what you said plus some digging I tried this:
diff --git a/src/Output/gemglfw3window.cpp b/src/Output/gemglfw3window.cpp
index 5921ac5e2..e89f4b2d2 100644
--- a/src/Output/gemglfw3window.cpp
+++ b/src/Output/gemglfw3window.cpp
@@ -590,6 +590,7 @@ gemglfw3window :: gemglfw3window(void) :
m_width = m_height = 0;
if(s_instances==0) {
glfwSetErrorCallback(error_callback);
+ glfwInitHint(GLFW_PLATFORM, GLFW_PLATFORM_X11);
if(!glfwInit()) {
throw(GemException("could not initialize GLFW infrastructure"));
}
(https://github.com/glfw/glfw/blob/master/docs/intro.md#shared-init-hints-init_hints_shared)
and at least superficially, it works.
border 0/1worksoffsetworks including across multiple screens
It would be ideal to be able to change that with a message to [gemwin]...
i guess the main question is, what the side-effects of that change would be on macOS and Windows...
Some hints are platform specific. These may be set on any platform but they will only affect their specific platform. Other platforms will ignore them.
so it shouldn't be an actual problem.
the other question is, what this will bring us in the future...
probably a [platform $1( message (specific to [gemglfw3window], with X11 being the default on linux) is the way forward.