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

Overlay extends off-monitor #18

Open
gig4ls opened this issue Jul 4, 2023 · 2 comments
Open

Overlay extends off-monitor #18

gig4ls opened this issue Jul 4, 2023 · 2 comments
Labels

Comments

@gig4ls
Copy link

gig4ls commented Jul 4, 2023

After following the instructions on the readme.md and running ./example/run.sh, the overlay shows up but extends incorrectly offscreen. Here is a description of my setup as seen in the attached picture:
Monitor 1 is marked as not primary, it is rotated vertically at 1440x2560. It is to the right of monitor 2.
Monitor 2 is marked as primary, it is 3400x1440. It is to the left of monitor 1.
The first overlay that identifies monitor 2 appears on monitor 1, and since the width on monitor 1 of 1440 is less than 3440, the overlay is cut off. I do not see any overlay for monitor 2, but presumably it is extended even further to the right of monitor 1.
I also cannot click on windows behind the overlays.

Screenshot from 2023-07-04 10-28-24

@anko
Copy link
Owner

anko commented Mar 4, 2024

Thanks for reporting. Definitely a bug.

I suspect what may be happening is that the overlay window itself is correctly positioned (since the intro text appears where I would expect it), but the blue rectangles with a red outline that are meant to line up with your actual monitors are offset for some reason.

If you're still up for debugging this after all this time:

  • I added more diagnostic information to the example page in 20002ae; it would be helpful to see the list of monitors that it shows. (The monitor positions are also logged in the console by hudkit, and to the Web Inspector console.)
  • Could you run xwininfo -name "hudkit overlay window" in a console and see what coordinates it outputs? That would confirm where the overlay window thinks it's positioned. (You may have to install xwininfo if it doesn't exist, but it's a tiny program.)

anko added a commit that referenced this issue Apr 15, 2024
The GTK documentation on `gtk_window_move` [1] state this:

> Asks the window manager to move window to the given position. Window
> managers are free to ignore this; most window managers ignore requests
> for initial window positions (instead using a user-defined placement
> algorithm) and honor requests after the window has already been shown.

That may be what causes the overlay to the positioned wrong in #18 and
#20 (comment). In any
case, it should do no harm to make sure.

[1]: https://docs.gtk.org/gtk3/method.Window.move.html
@anko
Copy link
Owner

anko commented Apr 15, 2024

Potentially fixed by 024bfb6. Please re-test with that if you have the time.

@anko anko added the bug label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants