From 98ea0a56db10b340dda29d326ac3005afe823a96 Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Mon, 6 Mar 2000 19:14:20 +0000 Subject: [PATCH] small fixes svn path=/trunk/kdebase/kwin/; revision=42768 --- client.cpp | 12 ++++++------ main.cpp | 10 ++++++++-- workspace.cpp | 14 ++++++++++++++ 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/client.cpp b/client.cpp index 7f32dd0fe7..8c11abe603 100644 --- a/client.cpp +++ b/client.cpp @@ -315,10 +315,10 @@ Client::Client( Workspace *ws, WId w, QWidget *parent, const char *name, WFlags if ( !XGetTransientForHint( qt_xdisplay(), (Window) win, (Window*) &transient_for ) ) transient_for = None; - + if ( mainClient()->isSticky() ) setSticky( TRUE ); - + } /*! @@ -370,10 +370,10 @@ void Client::manage( bool isMapped ) move( geom.x(), geom.y() ); gravitate( FALSE ); - if ( !placementDone && transient_for ) { - // transient_for workaround for broken qt snapshot, ##### - placementDone = TRUE; - } +// if ( !placementDone && transient_for ) { +// // transient_for workaround for broken qt snapshot, ##### +// placementDone = TRUE; +// } if ( !placementDone ) { diff --git a/main.cpp b/main.cpp index a86e745a94..3bc87f6b30 100644 --- a/main.cpp +++ b/main.cpp @@ -116,7 +116,7 @@ bool kwiniface::process(const QCString &fun, const QByteArray &, QCString& reply logout(); return TRUE; } - else + else { return FALSE; } @@ -140,6 +140,12 @@ bool Application::x11EventFilter( XEvent *e ) case PropertyNotify: kwin_time = e->xproperty.time; break; + case ConfigureNotify: + { + if ( e->xconfigure.window != e->xconfigure.event ) + return TRUE; + } + break; default: break; } @@ -157,7 +163,7 @@ static void sighandler(int) { QApplication::exit(); } -int main( int argc, char * argv[] ) +int main( int argc, char * argv[] ) { KAboutData aboutData( "kwin", I18N_NOOP("KWin"), version, description); diff --git a/workspace.cpp b/workspace.cpp index 3a1cc01ad8..118ea8f975 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -48,6 +48,19 @@ int Shape::shapeEvent() } +static void updateTime() +{ + static QWidget* w = 0; + if ( !w ) + w = new QWidget; + long data = 1; + XChangeProperty(qt_xdisplay(), w->winId(), atoms->kwm_running, atoms->kwm_running, 32, + PropModeAppend, (unsigned char*) &data, 1); + XEvent ev; + XWindowEvent( qt_xdisplay(), w->winId(), PropertyChangeMask, &ev ); + kwin_time = ev.xproperty.time; +} + Client* Workspace::clientFactory( Workspace *ws, WId w ) { // hack TODO hints @@ -285,6 +298,7 @@ bool Workspace::workspaceEvent( XEvent * e ) return TRUE; return destroyClient( findClient( e->xdestroywindow.window ) ); case MapRequest: + updateTime(); c = findClient( e->xmaprequest.window ); if ( !c ) { if ( e->xmaprequest.parent == root ) {