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

Open in external application (a.k.a App Launcher) closes immediately #2562

Closed
mmahmoudian opened this issue Apr 25, 2022 · 9 comments · Fixed by #2617 or #2675
Closed

Open in external application (a.k.a App Launcher) closes immediately #2562

mmahmoudian opened this issue Apr 25, 2022 · 9 comments · Fixed by #2617 or #2675
Labels
Bug It's a bug

Comments

@mmahmoudian
Copy link
Member

mmahmoudian commented Apr 25, 2022

Flameshot Version

Flameshot v11.0.0 (03af9d8)

Installation Type

User repository (AUR)

Operating System type and version

Manjaro KDE (Kernel: 5.15.32-1-MANJARO x86_64)

Description

Regardless having the daemon running or not, the App Launcher window immediately closes. This might be related to #2509, but the major difference is that in the case of this issue, the tray icon does not misbehave.

Steps to reproduce

  1. Try once with the daemon and once without
  2. flameshot gui
  3. select some region
  4. press the App Launcher button
  5. if the App Launcher window opens for a fraction of a second and closes immediately

Screenshots or screen recordings

Peek.2022-04-22.13-24.mp4

System Information

inxi --system --graphics --width=80
System:
  Host: precisiontower Kernel: 5.15.32-1-MANJARO arch: x86_64 bits: 64
    Desktop: KDE Plasma v: 5.24.4 Distro: Manjaro Linux
Graphics:
  Device-1: Intel CometLake-S GT2 [UHD Graphics 630] driver: i915 v: kernel
  Device-2: AMD Lexa XT [Radeon PRO WX 3200] driver: amdgpu v: kernel
  Display: x11 server: X.Org v: 1.21.1.3 driver: X:
    loaded: amdgpu,modesetting gpu: amdgpu resolution: 1: 1920x1080~60Hz
    2: 1080x1920~60Hz 3: 1080x1920~60Hz
  OpenGL: renderer: AMD Radeon Pro WX 3200 Series (POLARIS12 DRM 3.42.0
    5.15.32-1-MANJARO LLVM 13.0.1)
    v: 4.6 Mesa 21.3.8
@mmahmoudian mmahmoudian added the Unconfirmed Bug The bug is not confirmed by anyone else. label Apr 25, 2022
@LordMZTE
Copy link

LordMZTE commented May 7, 2022

I'm also getting this on arch with the flameshot packge from the arch repos.

@mmahmoudian mmahmoudian added Bug It's a bug and removed Unconfirmed Bug The bug is not confirmed by anyone else. labels May 7, 2022
@lommes
Copy link

lommes commented May 10, 2022

Same for me, built from source (0870eca and earlier), but works when I use "Take Screenshot" from the context menu of the app indicator in gnome 42 (problem already existed in 41)

@ramseyrashid
Copy link

I'm experiencing the same on Ubuntu 22.04. I tried the build from apt, snap and latest RC. All do the same as noted above.

@Alaskra
Copy link
Contributor

Alaskra commented May 16, 2022

I find it's #2003 that cause the problem using git bisect. I'm now trying to fix it. @mmahmoudian

@Alaskra
Copy link
Contributor

Alaskra commented May 16, 2022

flameshot/src/main.cpp

Lines 48 to 57 in 0870eca

void requestCaptureAndWait(const CaptureRequest& req)
{
Flameshot* flameshot = Flameshot::instance();
flameshot->requestCapture(req);
QObject::connect(flameshot, &Flameshot::captureTaken, [&](QPixmap) {
// Only useful on MacOS because each instance hosts its own widgets
if (!FlameshotDaemon::isThisInstanceHostingWidgets()) {
qApp->exit(0);
}
});

The problem is: on click applaunch button, the captureTaken signal emit and flameshot exit before choosing app to launch. I want to take applaunch as exportTask and an Final Action(for example, flameshot gui --applaunch). Is this ok?

@mmahmoudian
Copy link
Member Author

mmahmoudian commented May 16, 2022

@Alaskra thanks for following the case. To me it makes sense to be a final action, but then I wonder what will happen when the screenshot is taken with --applauncher argument? Does it open a window to choose, or that argument takes a software name/binary path as input? I think this should be discussed (@borgmanJeremy @veracioux )

@borgmanJeremy
Copy link
Contributor

The main reason adding it as an argument might be complicated is "open with" is only support on Linux. I think we should be able to solve the issue with it exiting without making it a final action.

@Alaskra
Copy link
Contributor

Alaskra commented May 17, 2022

The only way I find to solve this issue is adding launchapp to export task, and I find in code that all export task are final actions, so I want to make it final action at the same time.

@Alaskra
Copy link
Contributor

Alaskra commented May 21, 2022

#2617
I find add launchapp to final action useless for this problem. And if it's necessary to add it to final application, I'm happy to contribute code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug It's a bug
Projects
None yet
6 participants