flameshot-org / flameshot

Powerful yet simple to use screenshot software :desktop_computer: :camera_flash:
https://flameshot.org
GNU General Public License v3.0
24.69k stars 1.58k forks source link

Screenshot capture overlay only shows on a single monitor when using Wayland #3461

Open solonovamax opened 9 months ago

solonovamax commented 9 months ago

Flameshot Version

Flameshot v12.1.0 (-) Compiled with Qt 5.15.10

Installation Type

Linux, MacOS, or Windows Package manager (apt, pacman, eopkg, choco, brew, ...)

Operating System type and version

Arch Linux 6.6.9-zen1-1-zen

Description

when taking a screenshot on wayland with multiple monitors, the flameshot overlay only covers the rightmost monitor.

Note: flameshot worked perfectly fine before when I was using X11. I had no issues with it then, and the issue only appeared after switching to wayland.

Steps to reproduce

  1. install wayland
  2. Run flameshot gui

Screenshots or screen recordings

Before screenshot: image

After screenshot image

System Information

output from inxi --width 80 --system --graphics:

System:
  Host: solo-main Kernel: 6.6.9-zen1-1-zen arch: x86_64 bits: 64
    Desktop: KDE Plasma v: 5.27.10 Distro: Arch Linux
Graphics:
  Device-1: NVIDIA TU106 [GeForce RTX 2070] driver: nvidia v: 545.29.06
  Device-2: Logitech Webcam C310 driver: snd-usb-audio,uvcvideo type: USB
  Display: wayland server: X.org v: 1.21.1.10 with: Xwayland v: 23.2.3
    compositor: kwin_wayland driver: N/A resolution: 1: 1920x1080 2: 1680x1050
    3: 1920x1080
  API: EGL v: 1.5 drivers: nvidia,swrast,zink
    platforms: gbm,wayland,x11,surfaceless,device
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 545.29.06
    renderer: NVIDIA GeForce RTX 2070/PCIe/SSE2
  API: Vulkan v: 1.3.274 drivers: nvidia surfaces: xcb,xlib,wayland

xrandr --listactivemonitors output:

Monitors: 3
 0: +*DP-3 1920/530x1080/300+1680+0  DP-3
 1: +DP-1 1920/520x1080/290+3600+0  DP-1
 2: +DP-2 1680/470x1050/300+0+0  DP-2
The dbus-monitor content ``` signal time=1704325773.414745 sender=org.freedesktop.DBus -> destination=:1.945 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired string ":1.945" signal time=1704325773.414759 sender=org.freedesktop.DBus -> destination=:1.945 serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost string ":1.945" method call time=1704325779.803349 sender=:1.949 -> destination=org.freedesktop.DBus serial=24 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch string "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0='org.a11y.Bus',arg1=''" method call time=1704325779.803362 sender=:1.949 -> destination=org.freedesktop.DBus serial=25 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameHasOwner string "org.a11y.Bus" method call time=1704325779.803469 sender=:1.949 -> destination=org.freedesktop.DBus serial=26 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch string "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0='org.a11y.Bus'" method call time=1704325779.803519 sender=:1.949 -> destination=org.freedesktop.DBus serial=27 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner string "org.a11y.Bus" method call time=1704325779.803606 sender=:1.949 -> destination=org.a11y.Bus serial=28 path=/org/a11y/bus; interface=org.freedesktop.DBus.Properties; member=Get string "org.a11y.Status" string "ScreenReaderEnabled" method call time=1704325779.803884 sender=:1.949 -> destination=org.a11y.Bus serial=29 path=/org/a11y/bus; interface=org.freedesktop.DBus.Properties; member=Get string "org.a11y.Status" string "IsEnabled" method call time=1704325779.806088 sender=:1.949 -> destination=org.freedesktop.DBus serial=30 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch string "type='signal',path='/KDEPlatformTheme',interface='org.kde.KDEPlatformTheme',member='refreshFonts'" method call time=1704325779.806098 sender=:1.949 -> destination=org.freedesktop.DBus serial=31 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch string "type='signal',path='/KToolBar',interface='org.kde.KToolBar',member='styleChanged'" method call time=1704325779.806329 sender=:1.949 -> destination=org.kde.StatusNotifierWatcher serial=32 path=/StatusNotifierWatcher; interface=org.kde.StatusNotifierWatcher; member=RegisterStatusNotifierItem string ":1.951" method call time=1704325779.809969 sender=:1.949 -> destination=org.freedesktop.Notifications serial=33 path=/org/freedesktop/Notifications; interface=org.freedesktop.DBus.Introspectable; member=Introspect method call time=1704325779.816881 sender=:1.949 -> destination=org.freedesktop.DBus serial=34 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner string "org.freedesktop.Notifications" method call time=1704325779.817049 sender=:1.949 -> destination=org.freedesktop.Notifications serial=35 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify string "flameshot" uint32 0 string "flameshot" string "Flameshot Info" string "Capture saved to clipboard." array [ ] array [ ] int32 5000 method return time=1704325779.859724 sender=:1.949 -> destination=:1.948 serial=36 reply_serial=38 ```
Drukob commented 7 months ago

I can confirm the same issue on Fedora 39 also using 3 Monitors

Before screenshot: Screenshot_20240208_191706

During screenshot: Screenshot_20240208_191635

Note that it duplicates my leftmost display to the rightmost (with different resolution) and only allows me to select an area on that monitor.

Flameshot also complains with the following log message: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()

Flameshot v12.1.0 (-)
Compiled with Qt 5.15.10
xrandr --listactivemonitors ``` Monitors: 3 0: +*eDP-1 1920/280x1280/190+3840+752 eDP-1 1: +DP-6 1920/530x1080/300+0+0 DP-6 2: +DP-7 1920/520x1080/290+1920+0 DP-7 ```
inxi output ``` System: Host: spookora Kernel: 6.7.0+ arch: x86_64 bits: 64 Desktop: KDE Plasma v: 5.27.10 Distro: Fedora release 39 (Thirty Nine) Graphics: Device-1: Intel Alder Lake-UP3 GT2 [Iris Xe Graphics] driver: i915 v: kernel Display: wayland server: X.org v: 1.20.14 with: Xwayland v: 23.2.4 compositor: kwin_wayland driver: X: loaded: N/A unloaded: fbdev,modesetting,vesa gpu: i915 resolution: 1: 1920x1080 2: 1920x1080 3: 1920x1280 API: EGL v: 1.5 drivers: iris,swrast platforms: wayland,x11,surfaceless,device API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 23.3.4 renderer: Mesa Intel Graphics (ADL GT2) API: Vulkan v: 1.3.268 drivers: intel,llvmpipe surfaces: xcb,xlib,wayland ```
reggermont commented 7 months ago

Also have the issue. As a temporary solution, you can try to remove the absolute from your wayland config

From

for_window [app_id="flameshot"] border pixel 0, floating enable, fullscreen disable, move absolute position 0 0

To

for_window [app_id="flameshot"] border pixel 0, floating enable, fullscreen disable, move position 0 0

poplawskidaniel commented 7 months ago

Using sway I fount that this works better for me: for_window [title="flameshot" app_id="flameshot"] fullscreen enable global

Drukob commented 7 months ago

Thanks, that worked nicely! For other people using KDEs default window manager kwin, the following setting worked for me: kwinrule

armv8-a commented 6 months ago

The KWin window rule fix does not seem to work when you have a monitor arrangement where the top left does not contain actual screen area. Example: image

The window gets placed in an even worse way, in the bottom right corner: image

I can manually drag the flameshot window to the correct location, but no matter what I try, I can't make it go there automatically.

Edit: This window rule seems to work.