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

Wayland does not support QWindow::requestActivate() #3842

Open
mmahmoudian opened this issue Feb 14, 2025 · 6 comments
Open

Wayland does not support QWindow::requestActivate() #3842

mmahmoudian opened this issue Feb 14, 2025 · 6 comments
Labels

Comments

@mmahmoudian
Copy link
Member

Flameshot Version

Flameshot v12.1.0 (7aa69e4)
Compiled with Qt 5.15.16

Installation Type

Compiled from source

Operating System type and version

EndeavourOS

Description

Building against HEAD (7aa69e4), running any Flameshot command results in error and aborting from taking the screenshot:

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.
QLayout: Attempting to add QLayout "" to SidePanelWidget "", which already has a layout
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()

Steps to reproduce

  1. clone and checkout the commit:
    git clone --depth 1 [email protected]:flameshot-org/flameshot.git
    cd flameshot
    git reset --hard 
  2. compile
    mkdir build
    cd build
    cmake ../ -DUSE_WAYLAND_GRIM=true -DUSE_WAYLAND_CLIPBOARD=1
    make -j$(nproc --ignore 1)
  3. run flameshot:
    pkill flameshot
    sleep 1
    ./src/flameshot gui

Screenshots or screen recordings

No response

System Information

inxi --width 80 --system --graphics
System:
  Host: mehrad Kernel: 6.6.72-1-lts arch: x86_64 bits: 64
  Desktop: KDE Plasma v: 6.3.0 Distro: EndeavourOS
Graphics:
  Device-1: Intel CometLake-S GT2 [UHD Graphics 630] driver: i915 v: kernel
  Device-2: Advanced Micro Devices [AMD/ATI] Lexa XT [Radeon PRO WX 3200]
    driver: amdgpu v: kernel
  Display: wayland server: X.org v: 1.21.1.15 with: Xwayland v: 24.1.5
    compositor: kwin_wayland driver: X: loaded: amdgpu,modesetting
    dri: iris,radeonsi gpu: i915 resolution: 1: 1920x1080~60Hz
    2: 1920x1080~60Hz
  API: EGL v: 1.5 drivers: iris,radeonsi,swrast
    platforms: gbm,wayland,x11,surfaceless,device
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.3.4-arch1.1
    renderer: Mesa Intel UHD Graphics 630 (CML GT2)
  API: Vulkan Message: No Vulkan data available.
  Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
    de: kscreen-console,kscreen-doctor wl: wayland-info
    x11: xdpyinfo, xprop, xrandr
@jack9603301
Copy link
Contributor

jack9603301 commented Feb 14, 2025

cmake ../ -DUSE_WAYLAND_CLIPBOARD=1

try

@mmahmoudian
Copy link
Member Author

@jack9603301

cmake ../ -DUSE_WAYLAND_CLIPBOARD=1

try

If you meant that I remove the -DUSE_WAYLAND_GRIM=true in the cmake and only use cmake ../ -DUSE_WAYLAND_CLIPBOARD=1, then that doesn't work either

@jack9603301
Copy link
Contributor

The grim adapter should not be started under KDE, using the traditional dbus protocol may work. The grim adapter is explicitly designed to work for the wayland implementation of wlroots, and will not work with KDE and GNOME

@jack9603301
Copy link
Contributor

rm -rfv *
cmake ../ -DUSE_WAYLAND_CLIPBOARD=1

@ElSamhaa
Copy link

Not working on fedora 41 as well

@borgmanJeremy
Copy link
Contributor

@mmahmoudian can you capture the dbus log using something like bustle? This issue caught my attention because i also experienced this on my forked version. But I did a clean rebuild and some arch updates and now the problem is gone.

When I was first experiencing the issue there was a dbus error saying I lacked permissions. I was thinking something in plasma changed so I went to do some bisecting but the problem mysteriously resolved.

I tried replicating using the aur flameshot-git package as well and can no longer replicate it.

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

4 participants