flameshot-org / flameshot

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

Flameshot on Wayland not handling multiple screens #2364

Open Steffo99 opened 2 years ago

Steffo99 commented 2 years ago

Initial report

Flameshot Version

Flameshot v11.0.0 ()
Compiled with Qt 5.15.2
linux: 5.16.5-arch1-1
arch: unknown

Installation Type

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

Operating System type and version

Linux 5.16.5-arch1-1 #1 SMP PREEMPT Tue, 01 Feb 2022 21:42:50 +0000 x86_64 GNU/Linux

Description

Summary

While using multiple screens on Plasma Wayland, Flameshot seems unable to detect all of them properly, and instead takes a screenshot of the left-most screen through KWin, and prompts the user to edit it via the editor.

Additionally, Flameshot seems unable to copy the selected screenshot to the clipboard, but no error is shown and I'm unsure it's related to this bug.

Logs

steffo@nitro:~$ flameshot gui
Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen.
Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen.
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen.
Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen.
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()

Steps to reproduce

With a Wayland session with multiple monitors, using Plasma Desktop:

  1. Run flameshot gui

Screenshots or screen recordings

Will provide a screen recording as soon as OBS Studio finishes compiling 🥲

System Information

uname

steffo@nitro:~$ uname -a
Linux nitro 5.16.5-arch1-1 #1 SMP PREEMPT Tue, 01 Feb 2022 21:42:50 +0000 x86_64 GNU/Linux

Plasma

Plasma Desktop installed from the plasma-desktop 5.23.5-1 Arch Linux package.

mmahmoudian commented 2 years ago

@Steffo99 can you also post here your monitor arrangement and if you have different resolutions and scalings on the monitors.

Steffo99 commented 2 years ago

My monitor arrangement is:


That said...

OBS seems to be failing to launch, so there might be something else currently not working on my setup...

I should be able to do more research on the problem either tomorrow or on Sunday: I'll keep you updated with my findings!

Steffo99 commented 2 years ago

System information 2

I just noticed I forgot to mention that I'm using Wayland with the Nvidia proprietary driver and the newly introduced GBM API.

Screen capture failure

I couldn't get a single screen capture program to work, so I'm starting to suspect that something is wrong with my setup.

OBS, KSnap and Grim logs ```console steffo@nitro:~$ obs Attempted path: share/obs/obs-studio/locale/en-US.ini Attempted path: /usr/share/obs/obs-studio/locale/en-US.ini Attempted path: share/obs/obs-studio/themes/Dark.qss Attempted path: /usr/share/obs/obs-studio/themes/Dark.qss info: Platform: Wayland info: CPU Name: AMD Ryzen 5 1600X Six-Core Processor info: CPU Speed: 3102.166MHz info: Physical Cores: 6, Logical Cores: 12 info: Physical Memory: 15992MB Total, 8343MB Free info: Kernel Version: Linux 5.16.5-zen1-1-zen info: Distribution: "Arch Linux" Unknown info: Session Type: wayland info: Portable mode: false Attempted path: share/obs/obs-studio/themes/Dark/no_sources.svg Attempted path: /usr/share/obs/obs-studio/themes/Dark/no_sources.svg QMetaObject::connectSlotsByName: No matching signal for on_tbar_position_valueChanged(int) QMetaObject::connectSlotsByName: No matching signal for on_actionShowTransitionProperties_triggered() QMetaObject::connectSlotsByName: No matching signal for on_actionHideTransitionProperties_triggered() info: OBS 27.1.3-tytan652-14 (linux) info: --------------------------------- info: --------------------------------- info: audio settings reset: samples per sec: 48000 speakers: 2 info: --------------------------------- info: Initializing OpenGL... info: Using EGL/Wayland info: Initialized EGL 1.5 error: eglChooseConfig failed error: device_create (GL) failed error: Failed to initialize video. Your GPU may not be supported, or your graphics drivers may need to be updated. Cannot find EGLConfig, returning null config error: obs_display_init: Failed to create swap chain info: Freeing OBS context data info: == Profiler Results ============================= info: run_program_init: 2076.4 ms info: ┣OBSApp::AppInit: 6.239 ms info: ┃ ┗OBSApp::InitLocale: 0.861 ms info: ┗OBSApp::OBSInit: 77.217 ms info: ┣obs_startup: 12.337 ms info: ┗OBSBasic::OBSInit: 6.23 ms info: ┣OBSBasic::InitBasicConfig: 0.102 ms info: ┣OBSBasic::ResetAudio: 0.227 ms info: ┗OBSBasic::ResetVideo: 5.864 ms info: obs_hotkey_thread(25 ms): min=0 ms, median=0 ms, max=0.001 ms, 99th percentile=0.001 ms, 100% below 25 ms info: audio_thread(Audio): min=0.008 ms, median=0.019 ms, max=0.032 ms, 99th percentile=0.032 ms info: ================================================= info: == Profiler Time Between Calls ================== info: obs_hotkey_thread(25 ms): min=25.032 ms, median=25.082 ms, max=25.491 ms, 100% within ±2% of 25 ms (0% lower, 0% higher) info: ================================================= info: Number of memory leaks: 184 ``` ```console steffo@nitro:~[130]$ ksnip Warning: Unable to find any translation files for ksnip. Warning: Unable to find any translation files for kImageAnnotator. Warning: Wayland does not support QWindow::requestActivate() Warning: Wayland does not support QWindow::requestActivate() Warning: This plugin does not support setting window opacity Critical: Unable to show image: No image provided but one was expected. Warning: Wayland does not support QWindow::requestActivate() Warning: Wayland does not support QWindow::requestActivate() ``` ```console steffo@nitro:~$ grim compositor doesn't support wlr-screencopy-unstable-v1 ```

The grim log makes me think that perhaps a protocol required for proper screen capture is missing from KWin...

Steffo99 commented 2 years ago

Segfault?

flameshot screen appearently segfaults?

steffo@nitro:~$ flameshot screen
fish: Job 1, 'flameshot screen' terminated by signal SIGSEGV (Address boundary error)
Steffo99 commented 2 years ago

Example screenshot

This is what screenshots of the middle screen taken with flameshot gui look like:

A 1920x1080 screenshot taken from the middle screen, displaying part of the left 1280x1024 screen

Steffo99 commented 2 years ago

Screenshot of the bug

spectacle seems to work!

Screenshot_20220206_175726

Steffo99 commented 2 years ago

If you need additional info I'd be glad to provide them :)

mmahmoudian commented 2 years ago

I have similar setup and don't have this issues.

Similarities:

Differences:

I can't mess up with this computer to try to reproduce this issue. So let's wait and see if other devs have a solution/hypothesis in mind.

P.s: thanks for providing all these information 👍🏼

fraschm1998 commented 2 years ago

I have the same issue, I'm running Wayland with DWL on Gentoo with Nvidia proprietary drivers. I have my laptop 1920x1080 and an external monitor 3840x2160. I do not have Xwayland enabled in DWL but I do have Xwayland installed

ModProg commented 2 years ago

This is not related to NVIDIA, I have the same issue using sway with an AMD GPU.

Interesting to note is, it captures my left screen, but displays the editor on my right screen, even tho I tried to capture my middle screen.

Hi-Alex commented 2 years ago

Hi

Have the same issue in the same setup.

Flameshot v11.0.0 (-)
Compiled with Qt 5.15.2

Manjaro, Plasma version 5.24.2, and using wayland with proprietary nvidia drivers.

Appears in both scenarios when resolution on all screens is equal and when center monitor have higher resolution, but differently. In first case flameshot appears on the right screen showing the left screen, in second - appears on the center screen and shows left screen with a bit bit of the center screen.

In the terminal "flameshot gui" has this info: Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen. Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen. qt.qpa.wayland: Wayland does not support QWindow::requestActivate() Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen. flameshot: info: Screenshot aborted.

flameshot screen: zsh: segmentation fault (core dumped) flameshot screen

flameshot_bug_equal_resolution

flameshot_bug_diff_resolution

143mailliw commented 2 years ago

Yeah, I'm having the same issue on Sway as well, screenshots the left screen and shows the GUI on the right screen.

marcwittke commented 2 years ago

Am I late to the party? At least now it starts on Plasma 5.24.1 (Wayland, no scaling, intel iGPU) and flameshot 11, but...

Spectacle: spectacle

Flameshot: flameshot

(shifted to the right by one FullHD screen)

rstrube commented 2 years ago

I'm running KDE plasma 5.24.2 with multiple monitors and I'm also experiencing this issue.

What seems to be occurring is that flameshot starts with the total screen real-estate of both monitors combined, but tries to present that real estate on the primary monitor. This obviously can't fit, so things appear to shift around as it presents just the top left view of the total combined real estate.

I've noticed that on Gnome, you're prompted to select a monitor first (via xdg-desktop-portal), which limits flameshot's initial starting to a single monitor. This means that you can't create screenshots across monitors, but it doesn't have the issue where window contents are shifted around as it tries to squeeze the entire real estate view into a single monitor.

Perhaps do something similar with KDE plasma running on wayland and present the xdg-desktop-portal dialog?

xstable commented 2 years ago

I also have the same issue. Switched today from xorg to wayland, and found that on dual-screen setup, flameshot shows the "select area" at the right (secondary) screen, while in the background you see the content of the primary screen. Strange!

My Setup:

Betriebssystem: Manjaro Linux KDE-Plasma-Version: 5.24.2 KDE-Frameworks-Version: 5.91.0 Qt-Version: 5.15.2 Kernel-Version: 5.15.25-1-MANJARO (64-bit) Grafik-Plattform: Wayland Prozessoren: 8 × Intel® Core™ i7-3610QM CPU @ 2.30GHz Speicher: 15,1 GiB Arbeitsspeicher Grafikprozessor: Mesa DRI Intel® HD Graphics 4000

Flameshot v11.0.0 (-) Compiled with Qt 5.15.2 linux: 5.15.25-1-MANJARO manjaro: unknown

ryan77627 commented 2 years ago

Hey, I'd like to report I have the same issue as well. Running flameshot v11.0.0 on sway 1.7 and wlroots 0.15.1. Seems it grabs my left-most monitor as the only display when using flameshot screen (even when executing the command from the other screen). When running in gui mode, the screenshot is always of the leftmost screen and the interface always appears on the rightmost screen. Running under Xwayland (QT_QPA_PLATFORM=xcb) resolves the issue, however in sway it seems that breaks keyboard shortcuts (it thinks it isn't focused)

For reference, I have two monitors that are arranged like the attached photo shows. Both are 1080p with the same amount of scaling.

flameshot_screen_layout

rstrube commented 2 years ago

Running under Xwayland (QT_QPA_PLATFORM=xcb) resolves the issue, however in sway it seems that breaks keyboard shortcuts (it thinks it isn't focused).

This also fixes the issues i've been having in KDE Plasma with multiple monitors, thanks for the tip!

UltraBlackLinux commented 2 years ago

Although the above fix works (apparently only when launching FS via the terminal), I was able to verify, that version 0.10.2 doesn't have this problem

ryan77627 commented 2 years ago

Yeah. Im not by a computer to check for the commit currently, but I believe from past conversation and issues that xwayland was used by default in 0.10.2. If I have time later I'll try to bisect where the breaking commit is.

Sharparam commented 2 years ago

Setting QT_QPA_PLATFORM=xcb seems to make it work with multiple monitors, but makes it unable to handle keyboard shortcuts it seems. (Ctrl+C or Ctrl+S no longer work for copying to clipboard or saving to file, manually pressing the buttons or using double left click still works.)

fx commented 2 years ago

For me, it simply opens on the right-most monitor, full screen. Luckily that's easily fixed in the sway config:

for_window [app_id="flameshot"] border pixel 0, floating enable, fullscreen disable, move absolute position 0 0
143mailliw commented 2 years ago

For me, it simply opens on the right-most monitor, full screen. Luckily that's easily fixed in the sway config:

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

Thanks for this, that fixed my multi monitor issue. Now I just need to fix my clipboard and it'll be working perfectly.

borgmanJeremy commented 2 years ago

We just merged a change to use the XDG portal on KDE wayland. That might have resolved this.

doublevoid commented 2 years ago

The change doesn't seem to have helped, still need the QT_QPA_PLATFORM=xcb, which still breaks the shortcuts

rstrube commented 2 years ago

@borgmanJeremy I just installed from the Arch AUR (which pulls from git HEAD), and unfortunately it doesn't appear to be displaying the XDG portal modal for KDE when taking screenshots via Flameshot.

My system does have xdg-desktop-portal and xdg-desktop-portal-kde installed, and it does correctly display the modal for other applications when appropriate. For example, when I share my screen via WebRTC (in Chrome or FF) I do get the XDG portal modal that first asks me to to select the monitor before allowing screensharing to continue. For reference, here is the modal that appears if I attempt a screen share on the Mozilla gUM test page in FF:

image

I'm not sure if this is an issue with my system specifically, our maybe the AUR package isn't taking the latest code from the git repo? I'll dig in a bit more.

rstrube commented 2 years ago

@borgmanJeremy I did confirm that the AUR package is building from this commit SHA: 50db18451cab041da88200cc7fa358e2b5a396a6 so it does appear to be including the latest bits. I figured as much, but it never hurts to double check.

borgmanJeremy commented 2 years ago

The seg fault issue is resolved on the main branch now.

rstrube commented 2 years ago

@borgmanJeremy thank you for all your hard work and efforts. I don't think I was personally affected by the segfault issue that was fixed in main.

Just rebuilt, tested it out, unfortunately the XDG portal is still not being displayed for me. The old (non portal interface) is still being used that will let me select from (in my case) the top screen with a little bit of overlap from my bottom screen. Not sure why the portal isn't being displayed, I saw the commit you mentioned and it looks like you should be showing the portal for Gnome, KDE, and Sway now.

Please let me know if there's anything else I can provide to troubleshoot the issue.

borgmanJeremy commented 2 years ago

@rstrube plasma does not require the prompt to actually display every time. If you use a tool like bustle you can see that the XDG portal is being called:

image

Edit: However you are correct, the bug is still there. It only screenshots the left monitor.

borgmanJeremy commented 2 years ago

Okay after additional debugging I think this needs to be filed upstream. I adjusted flameshot to request the interactive dialog. This allows me to select between "current screen" and "full screen". "Full screen" does not appear to capture both screens. Additionally the portal API doesnt seem to have a way to request full screen. test

rstrube commented 2 years ago

@borgmanJeremy OK thanks for looking into it, that clarifies things. In some ways it might be helpful for KDE to always present the choice of monitor for the user, rather than making any assumptions. I know in Gnome the XDG portal is always displayed (which can be a bit annoying). If memory is correct, Gnome will actually display the modal multiple times, once to select the monitor, then another time when you actually try to take the screenshot on that monitor as a final confirmation. I call it the "Gnome modal dance". Is there anything I can help with in terms of opening up a bug upstream?

borgmanJeremy commented 2 years ago

I can file it upstream. I strongly do not want it to always display the prompt.

borgmanJeremy commented 2 years ago

I'm waiting to submit upstream. I did some further debugging and it seems like the full screen does work as long as both my monitors are plugged in when i start the shell.

The bug seems more related to Qt Full screen mode on wayland....More to come later

borgmanJeremy commented 2 years ago

@rstrube can you please test #2535.

It fixes the issue for me locally.

doublevoid commented 2 years ago

@borgmanJeremy I tested it locally, seems to work, shortcuts don't seem to work, but I guess it doesn't pertain to this issue.

rstrube commented 2 years ago

@borgmanJeremy yup I'll test it this evening and get back to you! Thanks for all your help.

doublevoid commented 2 years ago

@borgmanJeremy after testing a bit more, it seems that it is only able to capture every monitor if the primary is the leftmost one, on my setup, if the primary is the middle one, I can only capture the primary + the one on the right, but the one on the left doesn't get the fullscreen widget for capturing. Edit: this is of course referring to KDE's primary monitor

rstrube commented 2 years ago

@borgmanJeremy I did a complete build from the fix_wayland_multiscreen branch (commit b72a4f24c02fcfccef664b4282977567b380d2e0) and I believe I now understand why I'm running into problems.

For some background, I have two monitors in a vertical orientation. They are arranged like this:

image

Note that the top monitor is 2560x1080, the resolution is lower than the bottom one (2560x1440). Also note that the bottom monitor is my primary monitor.

If I use the capture launcher, and select "Full Screen (All Monitors)" it does indeed capture everything. Here is is the screenshot:

2022-04-09_12-10

However if I select the "Rectangular Region" I'm limited to the following selection on screen:

image

It's still showing me a region that is limited to my top most monitor (which is smaller resolution wise) combined with a portion of my bottom monitor.

Note that flameshot displays this area to capture from my bottom monitor.

I was curious if the issue is because of the orientation of my monitors (vertical rather than horizontal), so I changed it and these are the results:

Here are the full screen results:

2022-04-09_12-17

And here is if I select a rectangular region (again the left monitor is displayed on my right monitor):

image

This got me thinking about one more test, what if I make the larger monitor (resolution wise) the left most monitor. This ultimately solved the problem!

Here is the full screen results:

2022-04-09_12-24

And here is the rectangular region:

2022-04-09_12-25

I was able to select a region across both monitors! Note that I couldn't fully select eveything, because I was limited in terms of height from the smaller monitor. But I could select a rectangular region across both monitors!

So it appears when the top / left monitor has a smaller resolution than the bottom / right monitor the problem exhibits itself. If the monitors both had the same resolution, you probably wouldn't run into this issue! I also think which monitor is primary might affect the problem.

So if I make sure that my primary monitor has the larger resolution and make sure it's at the top / left, the rectangular selection works!

I hope this is helpful!

doublevoid commented 2 years ago

I haven't been as useful as @rstrube when it comes to testing, but I do gotta add in that all three of my monitors are of the same resolution, but I still wasn't able to capture all three of them using the rectangular region. Most of the times I could capture the leftmost and the one in the middle, but the selection region would show up on my middle one, and the third one.

waicool20 commented 2 years ago

Apparently for me compiling with -DFLAMESHOT_DEBUG_CAPTURE=ON on the fix_wayland_multiscreen branch kind of helps, I have 3 monitors in this configuration

1 2
3

Normally flameshot gui will launch in monitor 2, but with that definition it launches in monitor 1, however since my monitor 1 is smaller than monitor 2 and is aligned at the bottom, the screenshot window gets shoved down to monitor 1 level and doesnt display correctly on monitor 2 or 3. I tried setting a negative geometry to the capture widget to test things out but after some reading, it seems like windows aren't allowed to set their own position on Wayland.

exalented commented 2 years ago

can you please test #2535.

Behavior of flameshot stays the same with this branch coming from flameshot 11 in the community arch linux repo even after building with -DFLAMESHOT_DEBUG_CAPTURE=ON. I am on the nvidia 510.60.02 driver where when starting flameshot it doesn't allow me to capture any other another monitor other than the 21:9 monitor and the GUI is offset similar to how others have described. For now forcing flameshot to use the X server is the only way it stays somewhat usable. Running sway with this config:

HDMI-A-4
DP-6 DP-4 DP-3
$ swaymsg -t get_outputs Output HDMI-A-4 'Goldstar Company Ltd LG ULTRAWIDE 0x0000BFA9' Current mode: 2560x1080 @ 60.000 Hz Position: 1600,0 Scale factor: 1.000000 Scale filter: nearest Subpixel hinting: unknown Transform: normal Workspace: 4 Max render time: off Adaptive sync: disabled Available modes: 2560x1080 @ 60.000 Hz .. Output DP-3 'Dell Inc. DELL U2414H X0KTD62684UL' Current mode: 1920x1080 @ 60.000 Hz Position: 3840,1080 Scale factor: 1.000000 Scale filter: nearest Subpixel hinting: unknown Transform: normal Workspace: 3 Max render time: off Adaptive sync: disabled Available modes: 1920x1080 @ 60.000 Hz .. Output DP-4 'Dell Inc. DELL U2414H X0KTD6234K4L' Current mode: 1920x1080 @ 60.000 Hz Position: 1920,1080 Scale factor: 1.000000 Scale filter: nearest Subpixel hinting: unknown Transform: normal Workspace: 2 Max render time: off Adaptive sync: disabled Available modes: 1920x1080 @ 60.000 Hz .. Output DP-6 'Dell Inc. DELL U2414H X0KTD62356EL' (focused) Current mode: 1920x1080 @ 60.000 Hz Position: 0,1080 Scale factor: 1.000000 Scale filter: nearest Subpixel hinting: unknown Transform: normal Workspace: 1 Max render time: off Adaptive sync: disabled Available modes: 1920x1080 @ 60.000 Hz ..

EDIT: try this in your sway config as a workaround: for_window [app_id="flameshot"] floating enable, fullscreen disable, move absolute position 0 0, border pixel 0

Nolij commented 2 years ago

Just installed latest flameshot-git on Arch & KDE Plasma with an AMD GPU and am experiencing this problem with xdg-desktop-portal installed. Is there anything (logs, debugging, etc.) I can do to help solve this? This (shockingly) is the biggest blocker I have for using Wayland right now.

mmahmoudian commented 2 years ago

@Nolij Flameshot at the moment doesn't have a log system. Perhaps the biggest help would be to provide your exact Flameshot version and your system information.

Nolij commented 2 years ago

Flameshot:

Flameshot v11.0.0 (9763513a)
Compiled with Qt 5.15.3

System:

Distro: Arch Linux
Kernel: Linux 5.17.4-arch1-1
CPU: AMD Ryzen 9 5950X (32) @ 3.400GHz
GPU: MSI RX 6900 XT Gaming Z Trio
RAM: 4x 32GB DDR4-3600 CL18
GPU Driver: amdgpu (mesa, no amdgpu-pro drivers installed)
Graphics Platform: Wayland

DE/WM:

KDE Plasma: 5.24.4
KDE Frameworks: 5.93.0
Qt: 5.15.3

Monitors (adaptive sync tech listed with each monitor; no specification = no adaptive sync support):

1x 1920x1080@144Hz w/ FreeSync (Primary)
2x 1920x1080@60Hz
1x 3840x2160@60Hz

When attempting a screenshot the overlays all load on the 4K monitor.

Packages w/ versions (only partially filtered using grep, command below):

❯ paru -Q | grep -E "(flameshot|xdg.*portal|wayland|kde|linux|plasma|qt|mesa|kwin|amd)"
aarch64-linux-gnu-binutils 2.38-1
aarch64-linux-gnu-gcc 11.3.0-1
aarch64-linux-gnu-glibc 2.35-1
aarch64-linux-gnu-linux-api-headers 5.8-1
amdgpu-clocks-git r48.9d1196e-1
appstream-qt 0.15.3-1
archlinux-appstream-data 20220422-1
archlinux-keyring 20220424-1
attica-qt4 0.4.2-7
autokey-qt 0.95.10-6
avogadrolibs-qt5 1.95.1-7
bemenu-wayland 0.6.7-1
bluez-qt 5.93.0-1
deepin-qt-dbus-factory 5.5.22-2
deepin-qt5integration 5.5.20-1
deepin-qt5platform-plugins 5.0.59-1
deepin-wayland 1.0.0-1
egl-wayland 2:1.1.9+r3+g582b2d3-1
flameshot-git r1707.9763513a-1
gsettings-qt 0.1.20170110-3
kde-accessibility-meta 22.04-1
kde-applications-meta 22.04-1
kde-cli-tools 5.24.4-1
kde-dev-scripts 22.04.0-1
kde-dev-utils 22.04.0-1
kde-education-meta 22.04-1
kde-games-meta 22.04-1
kde-graphics-meta 22.04-1
kde-gtk-config 5.24.4-1
kde-multimedia-meta 22.04-1
kde-network-meta 22.04-1
kde-pim-meta 22.04-1
kde-sdk-meta 22.04-1
kde-system-meta 22.04-1
kde-utilities-meta 22.04-1
kdebugsettings 22.04.0-1
kdeclarative 5.93.0-1
kdeconnect 22.04.0-2
kdecoration 5.24.4-1
kded 5.93.0-1
kdeedu-data 22.04.0-1
kdegraphics-mobipocket 22.04.0-1
kdegraphics-thumbnailers 22.04.0-1
kdelibs4support 5.93.0-1
kdenetwork-filesharing 22.04.0-1
kdenlive 22.04.0-1
kdepim-addons 22.04.0-1
kdepim-apps-libs 20.08.3-1
kdepim-runtime 22.04.0-1
kdeplasma-addons 5.24.4-1
kdesdk-kioslaves 22.04.0-1
kdesdk-thumbnailers 22.04.0-1
kdesu 5.93.0-1
kdevelop 22.04.0-1
kdevelop-meta 22.04-1
kdevelop-php 22.04.0-1
kdewebkit 5.93.0-1
kqtquickcharts 22.04.0-1
kwayland 5.93.0-2
kwayland-integration 5.24.4-1
kwayland-server 5.24.4-1
kwin 5.24.4-1
kwindowsystem 5.93.0-1
layer-shell-qt 5.24.4-1
lib32-libva-mesa-driver 22.0.2-1
lib32-mesa 22.0.2-1
lib32-mesa-vdpau 22.0.2-1
lib32-util-linux 2.38-1
lib32-vulkan-mesa-layers 22.0.2-1
lib32-wayland 1.20.0-2
libaccounts-qt 1.16-3
libblockdev 2.26-3
libdbusmenu-qt4 0.9.3+16.04.20160218-1
libdbusmenu-qt5 0.9.3+16.04.20160218-6
libkdegames 22.04.0-1
libkdepim 22.04.0-1
liblastfm-qt5 1.1.0-1
libmygpo-qt5 1.1.0-3
libqtxdg 3.9.0-1
libva-mesa-driver 22.0.2-1
linux 5.17.4.arch1-1
linux-api-headers 5.16.8-1
linux-firmware 20220411.705f19a-1
linux-firmware-whence 20220411.705f19a-1
linux-headers 5.17.4.arch1-1
mcpelauncher-msa-ui-qt-git v0.1.beta.2.r10.ge830ebe-1
mesa 22.0.2-1
mesa-demos 8.4.0-7
mesa-utils 8.4.0-7
mesa-vdpau 22.0.2-1
mgba-qt 0.9.3-3
modemmanager-qt 5.93.0-1
networkmanager-qt 5.93.0-1
paho-mqtt-c 1.3.10-1
phonon-qt4 4.10.3-1
phonon-qt5 4.11.1-3
phonon-qt5-gstreamer 4.10.0-3
plasma-browser-integration 5.24.4-1
plasma-desktop 5.24.4-1
plasma-disks 5.24.4-1
plasma-firewall 5.24.4-1
plasma-framework 5.93.0-4
plasma-integration 5.24.4-1
plasma-meta 5.24-1
plasma-nm 5.24.4-1
plasma-pa 5.24.4-1
plasma-sdk 5.24.4-1
plasma-systemmonitor 5.24.4-1
plasma-thunderbolt 5.24.4-1
plasma-vault 5.24.4-1
plasma-wayland-session 5.24.4-2
plasma-workspace 5.24.4-2
plasma-workspace-wallpapers 5.24.4-1
plasma5-applets-thermal-monitor-git r114.a0f577e-1
polkit-kde-agent 5.24.4-1
polkit-qt4 0.112.0+git20180107-1
polkit-qt5 0.114.0-1
poppler-qt5 22.03.0-1
pulseaudio-qt 1.3-1
python-pyqt5 5.15.6-7
python-pyqt5-3d 5.15.5-3
python-pyqt5-chart 5.15.5-3
python-pyqt5-datavisualization 5.15.5-3
python-pyqt5-networkauth 5.15.5-3
python-pyqt5-purchasing 5.15.5-3
python-pyqt5-sip 12.10.1-1
python-pyqt5-webengine 5.15.5-4
python-qscintilla-qt5 2.13.2-1
python-qtpy 2.0.1-1
python-sphinxcontrib-qthelp 1.0.3-8
qca-qt5 2.3.4-3
qscintilla-qt5 2.13.2-1
qt-gstreamer 1.2.0-4
qt4 4.8.7-35
qt5-3d 5.15.3+kde+r18-1
qt5-base 5.15.3+kde+r145-1
qt5-charts 5.15.3+kde+r0-1
qt5-datavis3d 5.15.3+kde+r0-1
qt5-declarative 5.15.3+kde+r20-1
qt5-graphicaleffects 5.15.3+kde+r0-1
qt5-imageformats 5.15.3+kde+r0-1
qt5-location 5.15.3+kde+r2-1
qt5-multimedia 5.15.3+kde+r0-1
qt5-networkauth 5.15.3+kde+r0-1
qt5-purchasing 5.15.3+kde+r0-1
qt5-quickcontrols 5.15.3+kde+r0-1
qt5-quickcontrols2 5.15.3+kde+r4-1
qt5-script 5.15.9-1
qt5-sensors 5.15.3+kde+r0-1
qt5-speech 5.15.3+kde+r1-1
qt5-svg 5.15.3+kde+r12-1
qt5-tools 5.15.3+kde+r1-1
qt5-translations 5.15.3+kde+r2-1
qt5-virtualkeyboard 5.15.3+kde+r3-1
qt5-wayland 5.15.3+kde+r44-1
qt5-webchannel 5.15.3+kde+r3-1
qt5-webengine 5.15.9-2
qt5-webkit 5.212.0alpha4-13
qt5-websockets 5.15.3+kde+r3-1
qt5-x11extras 5.15.3+kde+r0-1
qt5-xmlpatterns 5.15.3+kde+r0-1
qt6-5compat 6.3.0-2
qt6-base 6.3.0-3
qt6-declarative 6.3.0-1
qt6-imageformats 6.3.0-1
qt6-svg 6.3.0-1
qt6-translations 6.3.0-1
qt6-wayland 6.3.0-1
qtdbusextended 0.0.3-1
qtkeychain-qt5 0.13.2-1
qtmpris 1.0.6-1
quazip-qt5 1.3-1
soqt 1.6.0-3
switch-mesa 20.1.0-4
teams-for-linux 1.0.24-1
telepathy-kde-accounts-kcm 22.04.0-1
telepathy-kde-approver 22.04.0-1
telepathy-kde-auth-handler 22.04.0-1
telepathy-kde-call-ui 22.04.0-1
telepathy-kde-common-internals 22.04.0-1
telepathy-kde-contact-list 22.04.0-1
telepathy-kde-contact-runner 22.04.0-1
telepathy-kde-desktop-applets 22.04.0-1
telepathy-kde-filetransfer-handler 22.04.0-1
telepathy-kde-integration-module 22.04.0-1
telepathy-kde-meta 22.04-1
telepathy-kde-send-file 22.04.0-1
telepathy-kde-text-ui 22.04.0-1
telepathy-logger-qt 17.09.0-1
telepathy-qt 0.9.8-2
udisks2-qt5 5.0.6-1
util-linux 2.38-1
util-linux-libs 2.38-1
vulkan-mesa-layers 22.0.2-1
wayland 1.20.0-2
wayland-protocols 1.25-1
wayland-utils 1.0.0-2
wireshark-qt 3.6.3-1
xdg-desktop-portal 1.14.3-1
xdg-desktop-portal-gtk 1.14.0-1
xdg-desktop-portal-kde 5.24.4-1
xdg-desktop-portal-wlr 0.5.0-1
xf86-video-amdgpu 22.0.0-1
xorg-xwayland 22.1.1-1

Please let me know if there's any logs for services or other system details I can provide.

Cxarli commented 2 years ago

I can confirm this bug on my system:

EndeavourOS (Arch-based) running sway with the following settings:

export SDL_VIDEODRIVER=wayland
export _JAVA_AWT_WM_NONREPARENTING=1
export XDG_CURRENT_DESKTOP=sway
export XDG_SESSION_DESKTOP=sway

With export QT_QPA_PLATFORM=wayland

With export QT_QPA_PLATFORM=xcb

In both cases, the actual snipping, drawing and buttons work fine

flameshot 11.0.0-5 (Compiled with Qt 5.15.3)
sway 1:1.7-9
xdg-desktop-portal 1.14.4-1
xdg-desktop-portal-gnome 42.1-1
xdg-desktop-portal-gtk 1.14.0-1
qt5-base 5.15.4+kde+r146-1
qt5-wayland 5.15.4+kde+r38-1
wayland 1.20.0-2
linux 5.15.43-1-lts

CPU AMD Ryzen 5 5500U with its integrated GPU ATI 04:00.0 Lucienne

Let me know if you need more information than this

mmahmoudian commented 2 years ago

@iursevla macOS is not using Wayland protocol. Uou can fix your issue by closing flameshot and openning it again. There is another issue that you should comment there. I'm on the phone and can't easily find that.

iursevla commented 2 years ago

@mmahmoudian sorry, I know it's not using Wayland but the problem was similar. Turns out that will multiple monitors flameshot upon clicking on the icon will try to take a screenshot of the main screen. Have to use the shortcut in the other screens. The way that Flameshot works (by kinda doing full screen mode in Mac) also was trowing me off. I was expecting for it to stay in the same desktop and appear on top of the other content.

mmahmoudian commented 2 years ago

@iursevla

The way that Flameshot works (by kinda doing full screen mode in Mac) also was trowing me off.

That's how macOS works. Any software that want to open a fullscreen window does the same, even Finder!

iursevla commented 2 years ago

@iursevla

The way that Flameshot works (by kinda doing full screen mode in Mac) also was trowing me off.

That's how macOS works. Any software that want to open a fullscreen window does the same, even Finder!

@mmahmoudian For example https://app.prntscr.com/ doesn't do that. The only reason I tried Flameshot was due to Lightshot started being super slow.

mmahmoudian commented 2 years ago

@iursevla

For example https://app.prntscr.com/ doesn't do that.

I'm not a heavy Mac user and I certainly am not a macOS developer, so I have no good understanding of how the dynamics work. They way Flameshot operates is that it takes a full screenshot and then let the user to select the region they want and let them annotate it as well. Is is possible that Lightshot is not doing that and instead creates an overlay? Lightshot is not opensource as far as I can see and therefore not possible for me to check under it's hood to see how it works.

In this video you can see that you can even undo the fullscreen of Flameshot (credit goes to @jasonycw who kindly posted this video in https://github.com/flameshot-org/flameshot/issues/2612#issuecomment-1153393445 ):

https://user-images.githubusercontent.com/4518597/173268782-5c206570-6f17-44a5-a89a-f687a6a7ed59.mov

Anyways, that animation is definitely a macOS thing as if you make Finder full screen, it makes the same animation (nothing is more macOS-native than Finder imho)