Opened 11 years ago

Closed 9 years ago

#3112 closed bug (fixed)

Screenshot won't take screenshot of active window with FFM

Reported by: nutela Owned by: julun
Priority: normal Milestone: R1
Component: Applications/Screenshot Version: R1/pre-alpha1
Keywords: Cc: WPJvanderMeer@…
Blocked By: Blocking:
Has a Patch: no Platform: x86

Description (last modified by humdinger)

# how to reproduce
Set Focus Follow Mouse in Mouse Prefs, Start Screenshot, go to options, set Take active window, set delay to 2 seconds, click Take Screenshot and set active window any other window not DeskBar

# experienced behavior
Screenshot won't take screenshot of active window with FFM, instead always the DeskBar is taken as the active window. If no active window is set with Click to focus then also the Deskbar is taken as the active window. Also cursor is included in the screenshot even if it is not set to do so.

# expected behavior
The Screenshot app should take the active window after a delay; Option "Take active window" should set the delay to more then 0 seconds. When the active window is Screenshot, a screenshot of Screenshot app should be made.

Change History (5)

comment:1 Changed 9 years ago by humdinger

Description: modified (diff)

Just a bit of reformatting for better readability.
The bug's still there with hrev34203. Taking the acive window only really works with Mouse setting "Click to Activate".

comment:2 Changed 9 years ago by Wim

Cc: WPJvanderMeer@… added

I started to look at this, but I am not sure what the proper behavior should be. Even if FFM is on, when you click on a window title, just like you would without FFM to make a window active, then the screen shot is taken of that window. I suppose that in Haiku there is a difference between a window that has focus and a window that is active.

When FFM is off, the window that has focus is also the active window. With FFM on, the window under the mouse has focus (that window could be partly obscured by other windows), and the active window is defined as the topmost window that is visible. The topmost window is taken as the first visible, not minimized window from the list of windows returned by the get_window_order() function. The DeskBar is always visible, so if no other window is activated a screenshot of the deskbar is taken.

Looking at it this way the current behavior seems to be logical, albeit somewhat counterintuitive. I would be willing to modify the current behavior, but that would mean that the window that has focus needs to be brought to the front, i.e. made active, before a screenshot can be taken.

So, what is the proper Haiku way?

Setting the delay time to a non-zero value when selecting "Take active window" is a trivial change. What value do you propose?

comment:3 Changed 9 years ago by Wim

Thinking about it a little more, I thought that maybe this issue can be resolved by changing the checkbox label from "Capture active window" to something like "Capture topmost window". However, since the mouse setting dialog also contains "Click to focus" and "Click to activate" options, the current label is more consistent.

Also, since a screenshot of the active (topmost) window is taken, a delay of 0 may not be a problem. It should only be a nonzero value when you want a screenshot of the window that has focus.

Anyway, these are different issues, and I propose to close this ticket.

comment:4 Changed 9 years ago by Wim

I have some new information: the window which has focus (i.e. the window which has it's tab colored yellow) is marked as the active window, but currently the screenshot application just finds the top window, and doesn't check if it is active.

In the new version I am writing this will be corrected. It should be noted, however, that a real screenshot will be taken of the area of the active window, which means that the screenshot will contain parts of any windows that obscure the active window.

comment:5 Changed 9 years ago by Wim

Resolution: fixed
Status: newclosed

Fixed in hrev37017.

Note: See TracTickets for help on using tickets.