small fixes

svn path=/trunk/kdebase/kwin/; revision=42768
This commit is contained in:
Matthias Ettrich 2000-03-06 19:14:20 +00:00
parent c19c5935bf
commit 98ea0a56db
3 changed files with 28 additions and 8 deletions

View file

@ -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 ) {

View file

@ -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);

View file

@ -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 ) {