Opened 11 years ago

Closed 9 years ago

#2988 closed bug (fixed)

Screenshot does not obey its mouse pointer option

Reported by: Adek336 Owned by: stippi
Priority: normal Milestone: R1
Component: Applications/Screenshot Version: R1/Development
Keywords: Cc: WPJvanderMeer@…
Blocked By: Blocking:
Has a Patch: no Platform: All

Description (last modified by humdinger)

Screenshot always captures the mouse and he doesn't wait the time you set in his preferences. He also always takes photo of whole screen, even when "take active window" is selected.

Attachments (1)

appserver-wim.patch (779 bytes) - added by Wim 9 years ago.
Patch that hides the cursor before calling DrawingEngine::ReadBitmap()

Download all attachments as: .zip

Change History (19)

comment:1 Changed 11 years ago by korli

Component: ApplicationsApplications/Screenshot
Owner: changed from axeld to julun

comment:2 Changed 11 years ago by julun

This seems to be 3 different issues here:

  • Screenshot always captures the cursor - introduced with change hrev24346 (only visible with vesa in that change(use Magnify in 24345 and 24346) not with real driver like vmware - In HEAD also visible with real driver!(probably because they use now double buffering as well))

  • Screenshot takes always the full screen - could not reproduce with HEAD, please give more info

  • Does not respect the timeout - could not reproduce with HEAD, please give more info


Best regards,
Karsten

comment:3 Changed 11 years ago by julun

Blocked By: 2997 added

comment:4 Changed 11 years ago by stippi

The fullscreen problem could be because it thinks the wrong window has focus (Tracker's desktop window). At least I have observed some flakieness with regards to picking the right focus window when I checked out the app. I was using focus follows mouse.

As for the cursor, I think I know what the problem is...

comment:5 Changed 11 years ago by julun

<snip> The fullscreen problem could be because it thinks the wrong window has focus (Tracker's desktop window). At least I have observed some flakiness with regards to picking the right focus window when I checked out the app. I was using focus follows mouse. </snip>

I wonder what one would expect while using 'focus follows mouse', it takes a screenshot of the 'active' window?

comment:6 Changed 11 years ago by Adek336

[quote]- Screenshot takes always the full screen - could not reproduce with HEAD, please give more info

  • Does not respect the timeout - could not reproduce with HEAD, please give more infoquote

Quite interestingly, I was pressing the "Save" button thinking it was the "Take snapshot" button :-) So after all, these two problems didn't happen.

comment:7 Changed 10 years ago by humdinger

Description: modified (diff)
Summary: Screenshot does not obey preferencesScreenshot does not obey its mouse pointer option

From Adek's last comment, I understand it's only the mouse pointer option, that's not respected. I can confirm this using the nvidia driver in hrev34203.
Changed ticket title accordingly and stroke through wrong part of the original description.

comment:8 Changed 9 years ago by Wim

I have created a simple patch that solves this bug, but since it doesn't deal with the root problem it could be classified as an ugly hack. I will submit the patch anyway, and leave it up to whoever is in charge to decide whether or not to apply it. I won't be offended if it isn't used :)

comment:9 Changed 9 years ago by axeld

Version: R1/pre-alpha1R1/Development

It's actually not a big hack, at least I don't see a better way of doing this easily.

However, there is one problem, as it does not take the current cursor status into account; if it's currently not visible, it could be for and after the screenshot.

comment:10 Changed 9 years ago by axeld

Component: Applications/ScreenshotServers/app_server
Owner: changed from julun to axeld

comment:11 in reply to:  9 Changed 9 years ago by Wim

Replying to axeld:

However, there is one problem, as it does not take the current cursor status into account; if it's currently not visible, it could be for and after the screenshot.

OK, I will fix that.

I have one question: since the drawCursor parameter of the DrawingEngine::ReadBitmap() function does not seem to do anything at the moment, is it better to remove it from the function call, or do you prefer to leave it like it is so the API doesn't change?

comment:12 Changed 9 years ago by Wim

Cc: WPJvanderMeer@… added

Oh, yeah, I forgot: what about ticket #2997, which basically describes the same problem.

Changed 9 years ago by Wim

Attachment: appserver-wim.patch added

Patch that hides the cursor before calling DrawingEngine::ReadBitmap()

comment:13 Changed 9 years ago by Wim

Updated the patch so it takes the current cursor status into account.

comment:14 Changed 9 years ago by axeld

Thanks. Sorry, though, my first evaluation was wrong - I just looked into DrawingEngine::ReadBitmap(), and it already contains code that looks like it should work. In other words, one should rather fix what's wrong there than to work around it like this.

comment:15 Changed 9 years ago by axeld

Owner: changed from axeld to stippi
Status: newassigned

Since Stephan wrote this code, maybe he has some idea.

comment:16 Changed 9 years ago by stippi

Yes, I've already "fixed" this code a long time ago, but there was one remaining issue, which was really strange and I couldn't resolve it, and I never commited the code. I don't remember which computer I made the changes on, but I can find out as soon as next Friday... unless it's lost. IIRC, the problem with the code is that it inserts the mouse pointer in the wrong buffer, but maybe there was more. When the app_server works in double buffered mode, the back buffer should not actually contain any mouse pointer, but one still wants to use the front buffer to capture BDirectWindows.

comment:17 Changed 9 years ago by Wim

Blocked By: 2997 removed
Component: Servers/app_serverApplications/Screenshot

comment:18 Changed 9 years ago by Wim

Resolution: fixed
Status: assignedclosed

Fixed in hrev37017.

Note: See TracTickets for help on using tickets.