(*** This bug was imported into bugs.kde.org ***) Package: ksnapshot Version: unknown (using KDE 2.1.1 ) Severity: wishlist Installed from: SuSE Compiler: gcc version 2.95.2 19991024 (release) OS: Linux 2.2.16 i686 OS/Compiler notes: In ksnapshot program I would like to see checkbox "Grab with mouse cursor". That means that program should get cursor shape and lay it over bitmap as most of recent videocards do cursor in hardware and will not allow to grab it directly from screen. Feature is very useful for taking screenshots for bug reports ;) (Submitted via bugs.kde.org) (Called from KBugReport dialog)
Not possible I'm afraid. Rich.
And now ? Is it possible ? KDE now knowjow to change cursor theme. So,get theme couldbe possible. If not,juste get the cursor position and include a generic cursor : it can be usefull,even if wrong cursor shape.
Wish to include or exclude mouse cursor when taking screen shot. For example, include "paint bucket" cursor in graphic object for OpenOffice.org DRAW documentation. Alternative would be some "clip art" feature somewhere in KDE so that I could copy an image of some particular mouse cursor shape (such as the paint bucket shape) and overlay the clip art onto my ksnapshot image. Found all sorts of mouse cursor shapes, but no paint bucket. Oi. :-(
this would be an extremly useful feature for bugreports. unfortunately it is not possible to vote anymore :/ and, for example, on windows foto canvas (acd software product) allows to grab with mouse pointer, so there must be some way to do this technically
Created attachment 10637 [details] Allows ksnapshot to take screenshots that include the mouse pointer I created a patch that adds this feature to ksnapshot. It relies on the XFIXES extension. It adds a new checkbox that allows you to turn the feature on and off, and a couple DCOP functions to get and set the state of the checkbox. It also adds DCOP functions to get and set the state of the "include decorations" checkbox, since I didn't see existing ones. And it fixes a couple of variables that could have been used before they were initialized.
This patch never made it into ksnapshot, didn't it? In ksnaphot of KDE 3.5.1 there still is no checkbox option to include the mouse pointer. Maybe this bug report and Bug 100926 should go together.
*** Bug 100926 has been marked as a duplicate of this bug. ***
Still no checkbox option to include the mouse pointer in KDE 3.5.5. Does this bug need to be reopened?
I don't understand how this got closed. It wasn't through the main bugzilla, reopenning. Aaron, any thoughts on how we can integrate this into the UI without screwing it up?
perhaps take the "include window decorations" checkbox and do sth like: Include: [ ] Window borders [ ] Mouse cursor it shouldn't mess things up too much, i suppose. i don't understand why the patch provided disables the mouse cursor in region mode, however. also, i wonder if the de-premultiplying is needed in qt4 (this would have to go into trunk, too late for 3.x, obviously). that would make the code a lot nicer =) adding the ability to turn these things on/off using d-bus is a nice touch, though. =)
Region mode stops and waits for you to draw a rectangle with the mouse, so at the moment that KSnapshot grabs the screen contents, the mouse cursor would always be positioned at the very corner of the rectangle you just drew. KSnapshot also changes the cursor to a crosshair while you're doing this. That's why the patch disables the mouse cursor grabbing when in region mode. I don't know how you'd make them compatible... stop and wait for a subsequent mouse click inside the rectangle you just drew?
how about capturing the mouse cursor at the moment the screen capture is made and blit the cursor image onto the screen capture? then the user can select the desired region.
I suppose that'd be a good way to do it. The "snapshot delay" is currently disabled in region mode also, though, so there's no chance to move the mouse to the correct spot before the screenshot is acquired.
*** This bug has been confirmed by popular vote. ***
Any updates on this? I would bump the version to 0.8.1, but that is not an option I can choose, at the moment.
The screenshot plugin for GIMP 2.6, which was released today, now includes the option to capture the mouse pointer. According to the release notes at <http://gimp.org/release-notes/gimp-2.6.html>, it uses XFixes. This is the same extension used by awendt@putergeek.com's patch. Any chance of getting this patch applied to the main development branch?
With KDE 4 is this possible now?
Yes, this is now possible thanks to improvements to the X server (specifcally the XFixes extension). It will get implemented, however I haven't had time to look into it yet.
*** Bug 184287 has been marked as a duplicate of this bug. ***
Can we get these patches committed?
Created attachment 39791 [details] Updated patch to add the cursor This patch updates the previous one to port it to Qt4, cmake, etc. Also adds support for window section mode. It also fixes a bug with ksnapshot when selecting the last option in ksnapshot.
Created attachment 39792 [details] Another implementation Sorry for the delay; this is patch it's been sitting locally for a couple of months, and forgot to send it to Richmoore earlier (done that a couple of days ago). Different implementation, not based on the previous patches here.
Cool. My patch has the advantages: 1) Disables/enables the checkbox depending on whether the mode supports it or not 2) Supports the Window Section mode 3) Loads the cursor straight into a ARGB32_Premultiplied
4) Saves/Loads the value
Created attachment 39797 [details] Updated for 64bit This updates the code to work (untested) on 64bit, based on pinotree's code.
Created attachment 39799 [details] Fixed implementation of mine This works on both 32bit and 64 bit (tested), saves the option value and what not.
I committed the fix I mentioned before when selecting the Current Screen.
The two patches are becoming more and more similar now. I think the only changes now are: 1) I enabled/disable the gui option when you change modes 2) I support the window section mode
For multiple cursor support we need to: 1) Use XIQueryDevice(XIAllMasterDevices) and find all the devices that are XIMasterPointer 2) Remember the current XGetClientPointer(dpy) 2) For each one found, do XSetClientPointer(dpy, pointer, None) 3) Now when we do XFixesGetCursorImage(dpy) we will get the image of the current cursor 4) XSetClientPointer the cursor back to the original one
*** Bug 241472 has been marked as a duplicate of this bug. ***
Created attachment 47953 [details] to get mouse cursor
#31 is a patch Just to state what I wrote in Bug 241472 The code is heavily inspired by http://msnkambule.wordpress.com/2010/04/09/capturing-a-screenshot-showing-mouse-cursor-in-kde/ Thanks to Mayibongwe Nkambule. /Thorbjørn
Could somebody please test - and probably merge my patch into trunk?
Sorry, I am stupid enough not to read the whole thread. Did not notice that serveral patches was made. Maybe somebody could include just one patch. PS: My patch does not support multiply cursors.
I have some weird rendering glitches with your patch. I applied it to ksnapshot 4.4.4. Screenshot: http://chaox.net/~jens/test1.png
i've merged John's patch with some modifications (in part to make it apply cleanly against trunk, in part to alter the strings and some of the logic) and also added code to remove the "Current Screen" option when there is only one screen on the system. i will commit once 4.6 is open since we are currently in string freeze and this change contains a new string. i will credit both John and tmartsum in the commit message. cheers! @Jens: when you say "your patch", do you mean tmartsum's or John's?
#36 Thanks a lot for patching trunk. I will look into the code. #35 It is probably against my patch, but I haven't seen anything similar. Does it happen all the time? (Both from ksnapshot and PrtSc), Nevertheless you can test against trunk now, but I doubt there are that many ways to grab the cursor - and John patch probably works in a similar way. I use: XFixesCursorImage *xfcursorImage = XFixesGetCursorImage( QX11Info::display()); QImage mouseCursor( (uchar*)xfcursorImage->pixels,xfcursorImage->width, xfcursorImage->height, QImage::Format_ARGB32_Premultiplied ); Could it be that this only happens if you press PrtSc or does it happen from knsapshot itself? I had some problems *not* getting a waiting cursor when ksnapshot was loading (on PrtSc) - and I wonder if this could be a timing issue. (Meaning happening when PrtSc was pressed and when mouse-cursor was changing back to normal cursor pointer. Meaning that the *xfcursorImage is getting invalid.)
Ok - misunderstood. Can you inform when the code is in trunk - then I like to test it.
*** Bug 237941 has been marked as a duplicate of this bug. ***
The code is in trunk, please test.
It DID work at some point, but currently I can *not* get it to work right. (On start no mouse-cursor (or did I see it one time) on delayed snapshots no mouse cursor ...)
It seems to work fine here, with 4.6 beta 2, under Archlinux. Video chipset Intel 855GM with intel driver v2.13.0, in case that matters. It works on the first snapshot and the ones after that, with and without desktop effects.
I've just tested with 4.6 beta 2 and Kubuntu, does work very well. BTW: I like the new layout of ksnapshot a lot!
kubuntu 10.10 with kde 4.6 RC 1, enabling the Include mouse pointer, does not work, I have: Capture mode: window under cursor snapshot delay: 2 seconds And the window I am capturing is: dolphin->places->network->add network folder wizard->select secure shell (ssh) and click next, press 'take a snap shot' and mouse over any of the fields or the text 'save & connect' button in the network folder wizard and the resulting image does not have the mouse pointer.
I can confirm that. It did work with Beta2 but doesn't work anymore with RC1. No matter which settings, first start or not, delay or not, region, window, fullscreen.
It seems to work when using “Window under mouse pointer” but no longer when doing a fullscreen shot.
It seems to work with fullscreen shot but NOT when using a Screenshot delay.
The mouse pointer is not included in my screen shots by the tool "KSnapshot 0.8.2" (KDE 4.6.0) that is running on my openSUSE 11.4 system if I select the modes "full screen" or "area in a window".
The same here. Sometimes mouse pointer is included in the screenshot. Sometimes not. Cannot figure out the circumstances when it works or doesn't.
With Ksnapshot 0.8.2 and KDE 4.7.1 the behavior of the "include mouse cursor" is still chaotic. It works sometimes, and sometimes not. Today, I can get the cursor when taking the screenshot on a Firefox window, but i don't get the cursor if I'm over a Digikam window :)
This bug is still present in KDE 4.9.1. When you choose „Full screen” and check the mouse cursor check box, KSnapshot doesn't draw the cursor to the resulting image.
Happy decade, bug!
I confirm this bug in KDE 4.9.5 and fullscreen selection.
I can confirm it with Chakra Linux + KDE 4.10 with latest nvidia drivers.
Created attachment 80358 [details] Cursor, capruted on screenshot (made with ksnapshot) With update to KDE 4.10.4 I can capture my cursor on snapshots, made with KSnapshot. I'm using: * Kubuntu 13.04 x86_64 * KDE 4.10.4 * Xorg 1.13.3
This is fixed for me also on 10.4.2.
I get the feeling that this may be related to X versions and drivers. Here with Intel drivers and Xorg 7.6 tings are not as happy: I get mouse cursors in window shots, but not full screen. Will require some sleuthing in the code to see what is going wrong with the cursor grabbing.
FWIW I get the cursor with both window shots and full screen. I have X.Org X Server 1.11.3 running intel_drv.so 2.17.0. Hardware is Sandybridge Mobile (GT2). There is an nvidia Optimus chip also, but I think it is disabled.
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years and I will be closing this bug. Spectacle is the replacement for ksnapshot now. Please test again and file a new bug for Spectacle if you still have issues. Thank you!