some attempt for dirk

svn path=/trunk/kdebase/kwin/; revision=76503
This commit is contained in:
Matthias Ettrich 2001-01-05 18:28:24 +00:00
parent 0165a8ce61
commit a189cb2c45
3 changed files with 39 additions and 5 deletions

View file

@ -1357,9 +1357,9 @@ void Client::mouseReleaseEvent( QMouseEvent * e)
if ( ( isMove() && options->moveMode != Options::Opaque )
|| ( isResize() && options->resizeMode != Options::Opaque ) )
XUngrabServer( qt_xdisplay() );
moveResizeMode = FALSE;
setGeometry( geom );
Events::raise( isResize() ? Events::ResizeEnd : Events::MoveEnd );
moveResizeMode = FALSE;
workspace()->setFocusChangeEnabled(true);
releaseMouse();
releaseKeyboard();
@ -1511,7 +1511,7 @@ void Client::mouseMoveEvent( QMouseEvent * e)
}
}
QApplication::syncX(); // process our own configure events synchronously.
// QApplication::syncX(); // process our own configure events synchronously.
}
/*!
@ -1538,7 +1538,7 @@ void Client::leaveEvent( QEvent * )
void Client::setGeometry( int x, int y, int w, int h )
{
QWidget::setGeometry(x, y, w, h);
if ( !isResize() )
if ( !isResize() && !isMove() )
sendSynteticConfigureNotify();
}
@ -1548,7 +1548,8 @@ void Client::setGeometry( int x, int y, int w, int h )
void Client::move( int x, int y )
{
QWidget::move( x, y );
sendSynteticConfigureNotify();
if ( !isMove() )
sendSynteticConfigureNotify();
}

View file

@ -197,6 +197,40 @@ extern "C" { int kdemain(int, char *[]); }
int kdemain( int argc, char * argv[] )
{
Display* dpy = XOpenDisplay( NULL );
if ( !dpy ) {
fprintf(stderr, "%s: FATAL ERROR while trying to open display %s\n",
argv[0], XDisplayName(NULL ) );
exit (1);
}
int number_of_screens = ScreenCount( dpy );
int screen_number= DefaultScreen( dpy );
int pos; // temporarily needed to reconstruct DISPLAY var if multi-head
QCString display_name = XDisplayString( dpy );
XCloseDisplay( dpy );
if ((pos = display_name.findRev('.')) != -1 )
display_name.remove(pos,10); // 10 is enough to be sure we removed ".s"
QCString envir;
if (number_of_screens != 1) {
for (int i = 0; i < number_of_screens; i++ ) {
// if execution doesn't pass by here, then kwin
// acts exactly as previously
if ( i != screen_number && fork() == 0 ) {
screen_number = i;
}
}
// in the next statement, display_name shouldn't contain a screen
// number. If it had it, it was removed at the "pos" check
envir.sprintf("DISPLAY=%s.%d", display_name.data(), screen_number);
if (putenv(envir.data())) {
fprintf(stderr,
"%s: WARNING: unable to set DISPLAY environment variable\n",
argv[0]);
perror("putenv()");
}
}
KAboutData aboutData( "kwin", I18N_NOOP("KWin"),
version, description, KAboutData::License_BSD,
"(c) 1999-2000, The KDE Developers");

View file

@ -1215,7 +1215,6 @@ void Workspace::showWindowMenuAt( unsigned long id, int x, int y )
return;
QPopupMenu* p = clientPopup( target );
p->setFocus();
p->popup( QPoint( x, y ) );
}