summaryrefslogtreecommitdiffstats
path: root/vcl/unx/gtk/app/gtkdata.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2005-11-01 09:35:17 +0000
committerKurt Zenker <kz@openoffice.org>2005-11-01 09:35:17 +0000
commita4d252502be2f43130351e8cd3e18d7b5ec4c3f8 (patch)
treeb34831245670f565ba2dd9837258a7ed501ca0f9 /vcl/unx/gtk/app/gtkdata.cxx
parentINTEGRATION: CWS vcl42 (1.100.2); FILE MERGED (diff)
downloadcore-a4d252502be2f43130351e8cd3e18d7b5ec4c3f8.tar.gz
core-a4d252502be2f43130351e8cd3e18d7b5ec4c3f8.zip
INTEGRATION: CWS vcl42 (1.18.2); FILE MERGED
2005/10/06 06:55:59 pl 1.18.2.2: RESYNC: (1.18-1.19); FILE MERGED 2005/08/23 12:58:40 pl 1.18.2.1: #i53471# XSETTING notification for gtk plugin
Diffstat (limited to 'vcl/unx/gtk/app/gtkdata.cxx')
-rw-r--r--vcl/unx/gtk/app/gtkdata.cxx20
1 files changed, 18 insertions, 2 deletions
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index bb2274c86947..d865d9f85879 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: gtkdata.cxx,v $
*
- * $Revision: 1.19 $
+ * $Revision: 1.20 $
*
- * last change: $Author: rt $ $Date: 2005-09-09 12:36:01 $
+ * last change: $Author: kz $ $Date: 2005-11-01 10:35:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -76,10 +76,14 @@
#ifndef _SAL_I18N_XKBDEXTENSION_HXX
#include "i18n_xkb.hxx"
#endif
+#ifndef _VCL_WMADAPTOR_HXX_
+#include <wmadaptor.hxx>
+#endif
#include "../../unx/source/inc/salcursors.h"
using namespace rtl;
+using namespace vcl_sal;
/***************************************************************************
* class GtkDisplay *
@@ -133,6 +137,18 @@ GdkFilterReturn GtkSalDisplay::filterGdkEvent( GdkXEvent* sys_event,
if (pDisplay->GetDisplay() == pEvent->xany.display )
{
+ // #i53471# gtk has no callback mechanism that lets us be notified
+ // when settings (as in XSETTING and opposed to styles) are changed.
+ // so we need to listen for corresponding property notifications here
+ // these should be rare enough so that we can assume that the settings
+ // actually change when a corresponding PropertyNotify occurs
+ if( pEvent->type == PropertyNotify &&
+ pEvent->xproperty.atom == pDisplay->getWMAdaptor()->getAtom( WMAdaptor::XSETTINGS ) &&
+ ! pDisplay->m_aFrames.empty()
+ )
+ {
+ pDisplay->SendInternalEvent( pDisplay->m_aFrames.front(), NULL, SALEVENT_SETTINGSCHANGED );
+ }
// let's see if one of our frames wants to swallow these events
// get the frame
for( std::list< SalFrame* >::const_iterator it = pDisplay->m_aFrames.begin();