• Maxim Monastirsky's avatar
    Different approach for tdf#115227 · 3ecf542a
    Maxim Monastirsky yazdı
    This reverts the previous attempt of commit
    250ad931 ("tdf#115227 svtools:
    suppress UNO notifications for color selectors"), in favor of
    a different fix. The advantage of this new approach is that
    is doesn't affect events other than activate/deativate, and that
    it covers more cases: Toolbar popups even if not based on
    svtools::ToolbarPopup, or if closed by clicking outside them,
    font name/size and paragraph style toolbar controls, notebookbar,
    context and main menus (for the non gtk3 native case, the gtk3
    native menus left for a future investigation). For now, keep this
    logic inside toolkit, but ideally it should be in vcl (after
    reviewing vcl internal listeners).
    
    One side effect that I noticed after this change, is that there is
    a deactivation/activation pair which suppressed when e.g. opening a
    new document from the start center. But I'm not sure if that's a
    problem, given that the focus state of the top window as a whole
    wasn't changed, only its contents, and there are other APIs to track
    activation of document components. This happens because the source
    and the target windows of those events are the same, and we need to
    suppress this case to fix the font name/size style controls, and also
    the color picker after 27473d1c
    ("tdf#114935 Move the focus back to the document"). Otherwise we'll
    need to find another way to move the focus to the document w/o
    triggering listeners.
    
    Another case that will see a change in behavior, is document event
    listeners in dbaccess, as the Focus/UnFocus events there are based
    on top window activation/deactivation. However, I think it's a good
    change, as currently just opening of a toolbar popup or main/context
    menus there triggers those document events, making them useless.
    
    I would like to also mention here, that in fact those top window
    activation events never really worked as tdf#115227 expects them, as
    the superfluous events for at least the font name/size, style and
    color toolbar buttons existed already in OOo. The behavior of the
    color buttons changed in LO for a few years, but regressed again in
    the work on a real focus grabbing for floating windows starting with
    commit dd46727b ("Resolves; tdf#87120
    no keyboard navigation inside floating windows"). That work also
    introduced superfluous events when using menus.
    
    And a note about the change in menubarwindow.cxx: When a menubar
    popup is closed it's deleted using the lazydelete mechanism, which
    reparents the popup window, so it doesn't appear anymore in the
    hierarchy of the document window. Moreover, I suspect that at some
    point the lazydelete thing will be replaced by a VclPtr mechanism,
    which might break this even further, so the event won't appear as
    coming from the popup window (which might be already disposed at
    this stage). So instead, temporarily set the menubar window as the
    current focus window, so the activation will appear as if it was
    coming from the menu bar window itself.
    
    Change-Id: I292232adfcbd1a31d66ce394cd2f1bf42a013ecb
    Reviewed-on: https://gerrit.libreoffice.org/48746Reviewed-by: 's avatarMaxim Monastirsky <momonasmon@gmail.com>
    Tested-by: 's avatarJenkins <ci@libreoffice.org>
    3ecf542a
Adı
Son kayıt (commit)
Son güncelleme
..
animatedimagespeer.hxx Loading commit data...
scrollabledialog.hxx Loading commit data...
vclxaccessiblecomponent.hxx Loading commit data...
vclxbitmap.hxx Loading commit data...
vclxcontainer.hxx Loading commit data...
vclxdevice.hxx Loading commit data...
vclxfont.hxx Loading commit data...
vclxgraphics.hxx Loading commit data...
vclxmenu.hxx Loading commit data...
vclxpointer.hxx Loading commit data...
vclxprinter.hxx Loading commit data...
vclxregion.hxx Loading commit data...
vclxspinbutton.hxx Loading commit data...
vclxsystemdependentwindow.hxx Loading commit data...
vclxtabpagecontainer.hxx Loading commit data...
vclxtopwindow.hxx Loading commit data...
vclxwindow.hxx Loading commit data...
vclxwindows.hxx Loading commit data...