Opened 11 years ago

Closed 11 years ago

#3513 closed bug (fixed)

Screenshot : non-functional when App's menu activated

Reported by: mmadia Owned by: axeld
Priority: normal Milestone: R1
Component: Kits/Interface Kit Version: R1/pre-alpha1
Keywords: Cc: leavengood@…
Blocked By: Blocking:
Platform: All


gcc2 hrev29322 real hardware

When the file menu of an application is selected, Screenshot will not activate via the key PrintScreen.

would this be a bug in Applications:Screenshot or perhaps Servers:input_server?

See the lack of attached screenshot for visual (har har).

Change History (9)

comment:1 by mmadia, 11 years ago

note: for some reason, screenshot can be activated when Bezilla's file menu is activated. However, VLC, PE, and Haiku's included apps prevent screenshot from working.

comment:2 by stippi, 11 years ago

This is expected, since BeZilla does not use regular BMenus. I would expect the bug to lurk in the BMenu or rather BMenuWindow code, which will not forward the event to the BWindow handler... or something along those lines.

comment:3 by anevilyak, 11 years ago

This probably has to do with the fact that BMenu currently receives input by polling GetMouse(), etc. in a loop while it's open, though I'm not sure if that should prevent other parts of the sys from getting the inputs involved.

comment:4 by stippi, 11 years ago

Very well possible. When a view is loopig with GetMouse(), the BWindow code will extract the mouse messages from it's message queue, but it will look for certain other messages and handle those anyways. Maybe it's as easy as adding the messages responsible for taking a screen shot to this code.

comment:5 by korli, 11 years ago

Could be caused by hrev29180. I should revert it for now: the problem with the current approach is that multiple screenshots are generated as multiple applications can get the screenshot message.

comment:6 by leavengood, 11 years ago

Cc: leavengood@… added

OK this is silly. Let's just move the handling of the Print Screen button from BWindow into the screen saver input filter. Mainly because it is already there and filtering events, and it represents one place to handle this. Also I intend to rename it and make it more general in the future (idle_filter or something.) Though I suppose it is possible for someone to replace or remove this filter.

Another option is just to put the handling of Print Screen in the input_server itself.

As the one who moved the handling into BWindow originally I now think it is dumb. It is too easy for an application to override and all of a sudden Print Screen won't work.

comment:7 by axeld, 11 years ago

It's actually wanted that an application can override this key. Just think of emulators such as Qemu - if you press the Print Screen key there, you should actually expect it work in the emulator, not outside of it.

Every key shortcut that is not handled within the application is impossible to override - while this might be desirable for things like changing a workspace (so that an app cannot lock you into a specific workspace), most key shortcuts should be handled within the application when possible.

comment:8 by axeld, 11 years ago

Component: Applications/ScreenshotKits/Interface Kit
Owner: changed from julun to axeld

comment:9 by axeld, 11 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev29776.

Note: See TracTickets for help on using tickets.