nheko
nheko copied to clipboard
Full screen image appears on wrong monitor
Describe the bug
When using nheko on a secondary screen, clicking on an image displays the image in fullscreen on the primary monitor.
To Reproduce
- Enter a Gnome Wayland session (Nvidia on my side) with a two-monitor setup
- Put nheko on the secondary monitor
- Select a chat
- Click on an image to display it full-screen
What happened?
The image is displayed in full screen on the other (primary) monitor.
(Subsequent clicks on the image open more and more image viewers on top of the first one.)
Additionally, sometimes on the first try after starting nheko, the image message is only selected instead of show in full screen.
Expected behavior
I would have expected the image to appear as overlay on top of the chat window.
Screenshots

Version
0.9.3-9bac429
Operating system
Linux
Installation method
Flathub
Qt version
No response
C++ compiler
No response
Desktop Environment
Gnome (Wayland)
Did you use profiles?
- [ ] Profiles used?
Relevant log output
No logs are generated during the event of showing images.
Backtrace
No response
Nheko uses a separate window to display images. It should open on the same monitor, but we have no control over that on wayland. So you need to configure your window manager to do the right thing, I think?
I also am encountering this same issue on Pop OS 22.04 using X11, so it isn't just a wayland issue. Nheko opens on my primary monitor, but regardless of where I put the nheko window, the image viewer always pops up over my secondary display (and clicking the image again in confusion opens more image previews)
I personally would think that further image previews shouldn't open if you keep clicking, unless there's a use case for that I'm missing, but that's obviously a lower priority/basically a non-issue if the popup was always covering the main UI.
I also have the same issue on sway/wayland. The fullscreen image viewer seems to favor my rightmost monitor currently, which is a tiny Steam Deck screen...
Also, it's weird that the window is a fullscreened borderless pop-up. I would have imagined a normal window, or a fullscreen window. Preferably with server-side decorations still (decorations are hidden when full-screen anyway).
swaymsg -t get_tree output with nheko preview window
swaymsg -t get_tree output with nheko preview window"floating_nodes": [
{
"id": 133,
"type": "floating_con",
"orientation": "none",
"percent": 1.1010752688172043,
"urgent": false,
"marks": [],
"focused": false,
"layout": "none",
"border": "csd",
"current_border_width": 2,
"rect": {
"x": 2688,
"y": 0,
"width": 1280,
"height": 800
},
"deco_rect": {
"x": 0,
"y": 0,
"width": 0,
"height": 0
},
"window_rect": {
"x": 0,
"y": 0,
"width": 1280,
"height": 800
},
"geometry": {
"x": 0,
"y": 0,
"width": 500,
"height": 500
},
"name": "nheko",
"window": null,
"nodes": [],
"floating_nodes": [],
"focus": [],
"fullscreen_mode": 1,
"sticky": false,
"pid": 32405,
"app_id": "io.github.NhekoReborn.Nheko",
"visible": true,
"max_render_time": 0,
"shell": "xdg_shell",
"inhibit_idle": false,
"idle_inhibitors": {
"user": "none",
"application": "none"
}
}
],
The bug is still persistent on X11 and wayland. Any updates on this?
The bug is still persistent on X11 and wayland. Any updates on this?
Sure: Nobody fixed it in Qt yet.
Sure: Nobody fixed it in Qt yet.
Thanks! Is there an upstream bug report we can track or work on?
Nheko uses a separate window to display images.
If it is not possible to control where it is opened, then may there be a better technical approach to the image preview than opening an additional window? Something like an overlay component within the existing window?
It should open on the same monitor, but we have no control over that on wayland.
There seems to be some kind of influence an application can exert.
If I click on an image in Telegram desktop, it opens a new window on top the existing one and on the same monitor. (Unless the window spans over multiple screens, then it seems to be a little more random).