flameshot-org / flameshot

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

only top left part is ready for operation in wayland with multiple monitors #2086

Open lilydjwg opened 3 years ago

lilydjwg commented 3 years ago

Flameshot version Flameshot v0.10.1 Compiled with Qt 5.15.2

Describe the bug I have two monitors arranged like this (the cyan and green rectangles):

图片

When I run flameshot gui on the green monitor, flameshot shows an image covering that monitor, but only top left part (the area in the red rectangle).

To Reproduce

  1. run XDG_CURRENT_DESKTOP=sway flameshot &
  2. run flameshot gui
  3. see

Expected behavior If flameshot can't cover all monitors like on X11, I hope it captures and covers only the monitor I run it so I can see and edit the area I intend to capture.

System Information Arch Linux current. Wayfire git. wlroots git.

mmahmoudian commented 3 years ago

@lilydjwg What are the resolution of those two monitors? For example you can use inxi --graphics

lilydjwg commented 3 years ago

The left one is 1920x1080 scale 1.5. The right one is 3840x2160 scale 2. The left one is shifted down several hundred pixels to match the position in reality.

inxi doesn't work well on Wayland.

mmahmoudian commented 3 years ago

Can you try having the scale of your left monitor to 100% or 200% and try again. This issue might be the result of fractional scaling.

lilydjwg commented 3 years ago

Tried set left to 1, still only top left part is shown and editable: that's about half of blank and half of top part of my left monitor's display.

mfzha commented 2 years ago

+1 to this issue. For reference @mmahmoudian here is what inxi --graphics looks like (note I'm still running on X11, KDE Plasma -- this is not a Wayland problem). This is with v11, compiled locally on my Tumbleweed machine.

Graphics:
  Device-1: AMD Ellesmere [Radeon RX
  470/480/570/570X/580/580X/590]
  driver: amdgpu v: kernel
  Device-2: SunplusIT USB 2.0 Camera type: USB
  driver: snd-usb-audio,uvcvideo
  Display: x11 server: X.Org 1.21.1.3 driver: loaded: amdgpu,ati
  unloaded: fbdev,modesetting,vesa resolution: 1: 3440x1440
  2: 1080x1920
  OpenGL: renderer: AMD Radeon RX 580 Series (POLARIS10 DRM
  3.44.0 5.16.0-1-default LLVM 13.0.0)
  v: 4.6 Mesa 21.3.3

Tested with various types of scaling, and that doesn't seem to be fixing it.

mmahmoudian commented 2 years ago

@mfzha in these type of issues inxi isn't enough as it does not show the arrangement of the monitors. Would you please send us a screenshot from your KDE Settings > Displays and mark which region is covered by Flameshot.

Alternatively you can draw it for us.

These type of issue is relatively hard to reproduce as it needs specific arrangements of monitors with specific resolutions. I also have a hunch that your issue is different from @lilydjwg because of the almost 4k resolved you have on your primary monitor.

mmahmoudian commented 2 years ago

@lilydjwg would you please also confirm that you still have this issue with version 11 we just released?

mfzha commented 2 years ago

@mmahmoudian see attached, the purple box shows how much of the screens are being caught. I agree, it's hard to reproduce, but I thought this was the closest approximation of my issue - happy to be pointed to a different open ticket, or open one myself.

pic

lilydjwg commented 2 years ago

@mmahmoudian The new version didn't work.

The AppImage package listed at the release page doesn't support wayland.

I tried to run a -git version and got errors.

I then built version 11 myself using the same build script for earlier versions, and still got errors:

flameshot: error: Unable to capture screen
flameshot: error: Unable to capture 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.
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()
flameshot: info: Screenshot aborted.
coolapso commented 2 years ago

getting exact same kind of issue on sway.

monitors configuration:

#Set screen outputs
output DP-5 scale 0
output DP-6 scale 0
output DP-7 scale 0
output DP-5 pos 0 0 res 3440x1440@164.999Hz 
output DP-6 pos 0 -1440 res 2560x1440@59.951Hz
output DP-7 pos -1440 -1120 res 2560x1440@59.951Hz transform 270 

Center Screen Top Screen Left Vertical Screen

Tried different scale levels. tried using QT_SCREEN_SCALE_FACTORS="" flameshot gui

System:

Arch linux

$flameshot --version
Flameshot v11.0.0 (-)
Compiled with Qt 5.15.2

let me know if i can be of more help.

mmahmoudian commented 2 years ago

@4s3ti did the following work?

export QT_SCREEN_SCALE_FACTORS="1;1"
pfitzn commented 1 year ago

I am getting the same issue in swaywm, with the following layout: image

The screens all use the same ratio.

When running flameshot gui from a terminal, the output is:

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()
p134c0d3 commented 1 year ago

+1 to this issue I'm running a single monitor (1440p), and when I hit the screenshot tool, only the top left portion of the screen is able to be captured by Flameshot (see attached screenshot).

image

Flameshot v12.1.0 (96c2c82e) Compiled with Qt 5.15.2 winnt: 10.0.23440 windows: 10

Also, when I right click the Flameshot sysTray icon, the menu is appearing nowhere near the sysTray (attached screenshot) image