Bug 371768 - Screenshot of "Window under cursor" of plasma applet show other part of the desktop
Summary: Screenshot of "Window under cursor" of plasma applet show other part of the d...
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-27 21:08 UTC by Unknown
Modified: 2018-02-20 14:29 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Spectacle "Window under cursor" of applet bug (162.77 KB, image/png)
2016-10-27 21:08 UTC, Unknown
Details
Screenshot of "Window under cursor" using master (87.01 KB, image/png)
2016-11-07 07:59 UTC, Unknown
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown 2016-10-27 21:08:18 UTC
Created attachment 101843 [details]
Spectacle "Window under cursor" of applet bug

While taking screenshots for an other bug I found a bug in Spectacle:

Description
-----------

* Open a plasma applet (anyone on the system tray) and pin it
* Open Spectacle and select "Window under cursor"
* take a screen shot
* The screenshot show the applet and a rectangle in the opposite side of the screen (see attached image)

The bug happens every time.
Screenshots of window don't show anomalies
Screenshots taken with the option "Active Window" show up correctly: only the applet is shown.

Expected behaviour
------------------

Only the selected applet is shown in the screenshot.

System
------

Application: Spectacle (16.08.2)

KDE Plasma Version: 5.8.2
Frameworks Version: 5.26.0
Qt Version: 5.7.0
Operating System: Linux 4.8.4-1-default x86_64
Distribution: "openSUSE Tumbleweed"
Comment 1 Peter Wu 2016-11-03 00:05:50 UTC
It is probably working as intended. Your "Window" is not really a new window, but a "window" part of the Plasma desktop. The "Window under cursor" option shows all windows belonging to the application.

Ticking the "Pop-up" only box might help, but in some cases it would capture only menus for example.

Just to be sure, can you try to reproduce your issue with the latest git version?
git://anongit.kde.org/spectacle.git
Comment 2 Unknown 2016-11-06 20:37:51 UTC
Thank you for the info.

The "Capture the current pop-up only" helps indeed.

If I managed to compile the source I would test it.

"cmake ." in the source directory gives me lots of errors. The first one is:

-- Could not set up the appstream test. appstreamcli is missing.
CMake Warning at /usr/share/ECM/find-modules/FindKF5.cmake:74 (find_package):
  Could not find a package configuration file provided by "KF5WidgetsAddons"
  (requested version 5.18.0) with any of the following names:

    KF5WidgetsAddonsConfig.cmake
    kf5widgetsaddons-config.cmake

  Add the installation prefix of "KF5WidgetsAddons" to CMAKE_PREFIX_PATH or
  set "KF5WidgetsAddons_DIR" to a directory containing one of the above
  files.  If "KF5WidgetsAddons" provides a separate development package or
  SDK, be sure it has been installed.

I have "libKF5WidgetsAddons5" installed but I don't see a devel package. Any suggestion?
Comment 3 Christoph Feck 2016-11-06 23:20:20 UTC
It might be called "kwidgetsaddons-devel", but please ask in a forum of your distribution. You will very likely need more devel packages to compile a KF5 application.
Comment 4 Unknown 2016-11-07 07:59:44 UTC
Created attachment 102087 [details]
Screenshot of "Window under cursor" using master

The test has been done with commit 1cf12826eff866c38ba94dc41d1fa20b383f52cd

Now the screenshot shows the main panel instead of a random place of the desktop.
Selecting the "Pop-up" option works as before.
Comment 5 Peter Wu 2016-11-07 23:20:38 UTC
This is how it is currently implemented in order to support menus (and apparently also the main program when a dialog is open). Maybe a bit unusual, but this is how I understood the "Popup-only" option.

(or "working as intended", but I am not sure if Boudhayan also intended to do this)
Comment 6 null 2018-01-31 14:30:33 UTC
It's still not working quite right with Spectacle 17.12.1 and Qt 5.10.1, i.e. trying to capture a menu popup (2 seconds delay, "Capture the current pop-up only" checked) will show an incorrect area of the screen.

See also Bug 374864#c1.
Comment 7 Nate Graham 2018-02-20 03:53:03 UTC
I can't reproduce this with git master, following the original steps to reproduce. Henrik, do they still reproduce for you, or are you doing something different?
Comment 8 null 2018-02-20 14:29:50 UTC
Hmh, cannot reproduce anymore either. Perhaps a fix in Plasma, or I just mixed up the issue? Let's set this as FIXED and unduplicate my other problem, I now filed Bug 390787 for that.