Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

White pixel in center of the screen on Gnome 44.3 with Wayland #10

Open
DanHerbert opened this issue Aug 9, 2023 · 12 comments
Open

White pixel in center of the screen on Gnome 44.3 with Wayland #10

DanHerbert opened this issue Aug 9, 2023 · 12 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@DanHerbert
Copy link

It seems that the latest update that fixed #9 with 60334b0 has caused a white dot to appear in the center of my primary workspace on Gnome 44.3 with Wayland. This white dot hides when in Activities view and reappears when I exit that view. It also seems fixed to my primary workspace. If I swipe between workspaces with my laptop's touch pad, the dot animates along with the rest of the workspace. But otherwise it stays fixed in the center of the screen, regardless of what apps are opened.

Disabling this extension makes the dot go away, and re-enabling it makes the dot appear again, so I'm fairly confident that it's something related to this extension, though I'm not sure what 60334b0 might have done to cause that since it's presumably not happening for everyone. My only guess is that it could be a combination of Gnome settings and this extension. I tried disabling all other extensions and the problem remains with only the top bar extension enabled on a fresh login with no other apps open.

@marcinjahn
Copy link
Owner

Do you use any custom theme?

@DanHerbert
Copy link
Author

No custom themes. I'm using just the Gnome default light theme.

@DanHerbert
Copy link
Author

So I figured out what setting causes it: In Gnome Tweaks I have the Windows > Center New Windows toggle enabled. Disabling that setting makes the dot caused by the extension to disappear.

I'm not sure if that's a problem that's fixable within the extension or if it's better to just treat this as working-as-intended.

@marcinjahn
Copy link
Owner

Interesting, myself, even with the "Center New Windows" tweak enabled, do not experience that issue.

I actually thought about spawning the dummy window (that's what this extension does on Wayland) outside of the screen viewport. Maybe you could try that yourself and see if it changes anything.

You'd do that by modifying the file at ~/.local/share/gnome-shell/extensions/[email protected]/dummy-window.js.

Modify the createWindow function to look something like this:

  createWindow(app) {
    let win = app.win;
    if (!win) {
      win = new Gtk.ApplicationWindow({
        application: app,
        defaultHeight: 0,
        defaultWidth: 0,
      });
    }
    win.set_keep_above(true);
    win.set_decorated(false);
    win.set_skip_taskbar_hint(true);
    win.set_skip_pager_hint(true);
    win.set_accept_focus(false);
    win.present();

    win.move(0, 0);
  }

The win.move(0, 0); is what I've added. After modifying the file, just disable and enable the extension, the changes will be registered right away. Try with different values than (0, 0). These are (x, y) coordinates. I honestly do not know if that will have any effect, but I guess it's worth a try.

@marcinjahn marcinjahn added the bug Something isn't working label Aug 9, 2023
@DanHerbert
Copy link
Author

Adding that win.move(0, 0) call fixed it! I tested with the Center New Windows setting enabled and toggling the extension to restart it with that patch and it definitely fixes the problem.

I've also managed to reproduce this on a clean Arch/Gnome 44.3/Wayland VM with everything default except the Center New Windows setting and this extension.

@marcinjahn
Copy link
Owner

That's great to hear. @DanHerbert , I could push this fix unless you want to open a PR for it?

@DanHerbert
Copy link
Author

Feel free to push the change whenever works for you.

@marcinjahn
Copy link
Owner

marcinjahn commented Aug 10, 2023

I looked at it today, and the "fix" I proposed actually has a "small" issue - the top bar no longer shows up on full screen! So, the extension becomes useless basically 😓
And, I am still unable to replicate it. If someone else experiences it, feel free to experiment, contributions are more than welcome. In the meantime, I'll add a proper "how to contribute" guide to the readme.

@Nokse22
Copy link

Nokse22 commented Feb 3, 2024

For me it's on the top left corner only in the first workspace. Using Gnome 45.3, Wayland, Fedora 39.

Screencast.from.2024-02-03.22-15-49.webm

@marcinjahn marcinjahn added the help wanted Extra attention is needed label Mar 25, 2024
@eriolloan
Copy link

I'm experiencing exactly the same as Noske22. (BTW, it's probably on the top-left because "center windows" is turned off.)

Editing dummy-window.js changed the white pixel's position to be on the first row of the first line:

Capture d’écran du 2024-04-03 13-45-43

win.move(0, 0) or win.move(-1, -1) made no difference (I don't know much about the innards of GNOME workspaces and I guess this outcome is probably expected).

@livexia
Copy link

livexia commented Sep 21, 2024

Same problem here, on the top-left. Can we set opacity using set_opacity? Trying on my machine not working, maybe because I am not familiar with gjs.

@ok-ttc
Copy link

ok-ttc commented Dec 31, 2024

For me it's on the top left corner only in the first workspace. Using Gnome 45.3, Wayland, Fedora 39.

Exactly the same issue here. I am on OpenSuse Tumbleweed, currently on Gnome 47.2, Wayland.

I have to disable the extension, because it is somewhat irritating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants