Prevent Waybar from hiding.
Describe the bug
I've been going crazy for days and can't figure out how this issue started. I updated both Wayfire to the latest version and Waybar, and from that moment on, this problem appeared: when I open a fullscreen app, especially with Wine, Waybar leaves an empty space in the bar area and doesn't go fully fullscreen.
I'm not sure if it's an IPC request timing issue or something else. However, if I toggle fullscreen on and off from within the game, it works correctly.
Additionally, in some games like Crysis 2, all mouse position events become misaligned, making the cursor behave erratically.
To Reproduce
- Open a game in fullscreen.
Expected behavior
I expect that any app running in fullscreen should cover the entire screen and that mouse input should remain accurate.
Screenshots or stacktrace
Wayfire version
git
It might be 78899608 causing the problem. Does the commit before this one work ok?
Yes, it did that before that change too.
I found a report from another user experiencing the same issue on Waybar:
[Waybar Issue #3387](https://github.com/Alexays/Waybar/issues/3387).
Now, I'm not sure if the issue is caused by Wayfire or Waybar. 😅
Maybe check if wf-panel does the same thing.
"Waybar leaves an empty space in the bar area and doesn't go fully fullscreen." You want waybar to go full screen?
I want the empty space not to remain
Maybe check if
wf-paneldoes the same thing.
Same problem, even with wf-panel. I created a simple fullscreen screen using GLFW.
Check if it happens to you as well, because I can't figure out if it's only on my configurations or something else.
I'm also uploading the code for a test.
#include <GLFW/glfw3.h>
int main() {
if (!glfwInit()) return -1;
GLFWmonitor* primaryMonitor = glfwGetPrimaryMonitor();
const GLFWvidmode* mode = glfwGetVideoMode(primaryMonitor);
glfwWindowHint(GLFW_RED_BITS, mode->redBits);
glfwWindowHint(GLFW_GREEN_BITS, mode->greenBits);
glfwWindowHint(GLFW_BLUE_BITS, mode->blueBits);
glfwWindowHint(GLFW_REFRESH_RATE, mode->refreshRate);
GLFWwindow* window = glfwCreateWindow(mode->width, mode->height, "Fullscreen Red", primaryMonitor, nullptr);
if (!window) {
glfwTerminate();
return -1;
}
glfwMakeContextCurrent(window);
while (!glfwWindowShouldClose(window)) {
glClearColor(1.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers(window);
glfwPollEvents();
}
glfwDestroyWindow(window);
glfwTerminate();
return 0;
}
@ammen99 Can you support me with this? Sorry for the trouble.
@CarloWood and @soreau, but do you have this problem?
@AgostinoA thanks for your glfw example, I can reproduce the issue. Will look into it and let you know when a bug fix is available.
@ammen99 It's a real pleasure for me. I'm here to find as many bugs as possible and give support to the project.
I had this issue before, but it's not happening anymore, at least for me. I can't reproduce it if it still exists. I am using: "99e61eb7cd3dc47c5a27efd1ff45f35611e337ba".
Have you tried with a bar like wf-panel or waybar? Because the problem is still evident to me.
Have you tried with a bar like wf-panel or waybar? Because the problem is still evident to me.
https://github.com/user-attachments/assets/4ded8b24-f8a9-4128-8f9a-40098778ef0f
Kindly can you share your wayfire.ini configuration? Did you compile using the master branch version or from your commit ?
Kindly can you share your wayfire.ini configuration? Did you compile using the master branch version or from your commit ?
If you share your config, I can check whether the issue is in the configuration or not.
Sorry for the trouble, but I still haven’t figured out this issue. I’m sharing my test base Wayfire and Waybar configs, I’m going crazy over this 😅 I don’t understand how you managed to get it working without making any specific code changes. I'm using the latest build compiled today from the repo waybar.ini.txt wayfire.ini.txt
@ammen99 Is this problem also evident by you I am doing something wrong in the configuration?
I can reproduce this bug in normal usage quite often, though not every time. It is a very weird bug but I'll be looking into it more, this is why I added it to the 0.10 milestone.
Ah ok I didn't understand, perfect.
However maybe I understood the problem from where it could arise from the reflow reserved areas method (workarea), it is missing the concept that if a window is in pending fullscreen it must exclude anchors
However maybe I understood the problem from where it could arise from the reflow reserved areas method (workarea), it is missing the concept that if a window is in pending fullscreen it must exclude anchors
The method is simply computing the workarea. But the workarea is a 'hint', fullscreen windows simply ignore it and take the full space.
If you try, for example, to brutally put if (false) or exclude this piece of code:
if(false)
{
switch (a->edge)
{
case ANCHORED_EDGE_TOP:
priv->current_workarea.y += a->reserved_size;
// fallthrough
case ANCHORED_EDGE_BOTTOM:
priv->current_workarea.height -= a->reserved_size;
break;
case ANCHORED_EDGE_LEFT:
priv->current_workarea.x += a->reserved_size;
// fallthrough
case ANCHORED_EDGE_RIGHT:
priv->current_workarea.width -= a->reserved_size;
break;
}
}
You realize that, for example, the GLFW sample I gave you goes fullscreen correctly.
So during opening, it passes through workarea → reflow_reserved_areas, in this case.
I closed by mistake, sorry
@AgostinoA Certainly, but what I am explaining is that the workarea calculation does not imply that a fullscreen window will get this size. See for example here: https://github.com/WayfireWM/wayfire/blob/a1d73f58a714ab9bd22ceba4de2aa3c62f9cddf4/src/core/window-manager.cpp#L204-L300
By the way, do you get this bug without the grid plugin?
I also tried disabling the grid, but it still causes the problem. Does it behave differently for you?
it's something from the config, not happening here, if you paste your config or at least give the plugins list, I could compare.
The configuration is in the previous messages, see. Or please send me your minimal configuration where it works for you, because I've been trying a thousand different combinations of plugins and other things for days. Thx for all guys
@killown It is also worth mentioning it does not happen every time for me. Sometimes it works, sometimes it does not.
https://github.com/user-attachments/assets/d2ccc353-599c-4cff-ab72-6612dbc1301e
Fullscreen must try on X11-based apps, as an example I passed along (GLFW)