diff options
author | Rüdiger Timm <rt@openoffice.org> | 2006-02-09 16:13:00 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2006-02-09 16:13:00 +0000 |
commit | 325393973bc689c8ec26af627daa026ccfa4bf4a (patch) | |
tree | 1b055ceab5b4c5ef471262ab1ab1c370be4043a9 | |
parent | 634214e7e57d4efeef2586f14e636db6fae2f07a (diff) |
INTEGRATION: CWS c03vcl (1.226.4); FILE MERGED
2006/02/08 17:13:12 hdu 1.226.4.3: #130755# delay AddDel member init to Window::ImplAddDel for now
2006/02/07 13:49:26 hdu 1.226.4.2: #130755# allow attaching to window in dog tag constructor
2006/02/07 12:57:37 hdu 1.226.4.1: #130755# use dog tag in ImplGrabFocus()
-rw-r--r-- | vcl/source/window/window.cxx | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 17ebbca2141b..52605c3b7bda 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -4,9 +4,9 @@ * * $RCSfile: window.cxx,v $ * - * $Revision: 1.227 $ + * $Revision: 1.228 $ * - * last change: $Author: kz $ $Date: 2006-02-06 13:17:53 $ + * last change: $Author: rt $ $Date: 2006-02-09 17:13:00 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -261,6 +261,15 @@ WindowImpl::~WindowImpl() // ----------------------------------------------------------------------- +// helper method to allow inline constructor even for pWindow!=NULL case +void ImplDelData::AttachToWindow( Window* pWindow ) +{ + if( pWindow ) + pWindow->ImplAddDel( this ); +} + +// ----------------------------------------------------------------------- + // define dtor for ImplDelData ImplDelData::~ImplDelData() { @@ -3919,6 +3928,10 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow, // ----------------------------------------------------------------------- void Window::ImplGrabFocus( USHORT nFlags ) { + // some event listeners do really bad stuff + // => prepare for the worst + ImplDelData aDogTag( this ); + // Es soll immer das Client-Fenster den Focus bekommen. Falls // wir mal auch Border-Fenstern den Focus geben wollen, // muessten wir bei allen GrabFocus()-Aufrufen in VCL dafuer @@ -4199,8 +4212,11 @@ void Window::ImplGrabFocus( USHORT nFlags ) if ( !ImplCallPreNotify( aNEvt ) ) GetFocus(); ImplCallActivateListeners( pOldFocusWindow ); - mpWindowImpl->mnGetFocusFlags = 0; - mpWindowImpl->mbInFocusHdl = FALSE; + if( !aDogTag.IsDelete() ) + { + mpWindowImpl->mnGetFocusFlags = 0; + mpWindowImpl->mbInFocusHdl = FALSE; + } } } |