[haiku-bugs] Re: [Haiku] #15254: BWindow shouldn't dispatch messages on behalf of BView

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Sat, 17 Aug 2019 16:35:32 -0000

#15254: BWindow shouldn't dispatch messages on behalf of BView
----------------------------------+----------------------------
   Reporter:  simonsouth          |      Owner:  nobody
       Type:  bug                 |     Status:  new
   Priority:  normal              |  Milestone:  Unscheduled
  Component:  Kits/Interface Kit  |    Version:  R1/Development
 Resolution:                      |   Keywords:
 Blocked By:                      |   Blocking:
Has a Patch:  0                   |   Platform:  All
----------------------------------+----------------------------

Comment (by waddlesplash):

Otherwise I don't see how the existing trick to get the CurrentMessage
 would still work, which would break all apps trying to do that (pretty
 much anything that handles keyboard events). This pretty much requires
 that KeyDown is handled while the window is inside its MessageReceived
 call.

 I don't think so? Looper()->CurrentMessage() is still valid when the
 View's MessageReceived is called, and thus it will still be when
 MouseDown() or one of the other hook functions is. So this potential
 change should not break this at all.

 The BWindow is responsible for dispatching messages to child views.
 Currently it has special cases for B_KEY_DOWN and the like to just call
 the BView's hook function directly. We could stop doing that and instead
 call the BView's MessageReceived and let that handle it.

-- 
Ticket URL: <https://dev.haiku-os.org/ticket/15254#comment:8>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: