[haiku-bugs] Re: [Haiku] #5393: Duplicate screenshots acquired in case Keymap preflet is opened.
- From: "pulkomandy" <trac@xxxxxxxxxxxx>
- Date: Sun, 04 Sep 2011 11:57:10 -0000
#5393: Duplicate screenshots acquired in case Keymap preflet is opened.
----------------------------------+----------------------------
Reporter: damoklas | Owner: axeld
Type: bug | Status: new
Priority: normal | Milestone: R1
Component: Kits/Interface Kit | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
----------------------------------+----------------------------
Comment (by pulkomandy):
There is a problem here :
* Create a window with a view inside, the view has
SetEventMask(B_KEYBOARD_EVENT);
* Add a PrintToStream in the window MessageReceived or DispatchMessage
* Unfocus the window
* Notice it still gets ALL keyboard events
Of course, the window will intercept some of them : screenshot, deskbar
switcher, command Q.
These were meant to be handled once by the focus view, now they are
handled twice (by the focus window and the seteventmask one).
More interesting : it's super-easy to make a keylogger and grab passwords
and other useful info, as all of this gets (at least) in
BWindow::DispatchMessage even when the window is not focused.
I'm not sure the window should get these messages at all when it's not
focused ? The Be Book doesn't seem to tell about it. Anyway, that's a
rather critical security problem :/
--
Ticket URL: <http://dev.haiku-os.org/ticket/5393#comment:4>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.
Other related posts: