Partially revert the recent xinerama commit - !isMapped == useCursorPos

was always true, no need for another argument.

svn path=/trunk/kdebase/kwin/; revision=269308
This commit is contained in:
Luboš Luňák 2003-11-24 15:05:50 +00:00
parent f30a41aaa6
commit 897e67f79a
5 changed files with 11 additions and 7 deletions

View file

@ -80,7 +80,7 @@ class Client : public QObject, public KDecorationDefines
void windowEvent( XEvent* e );
virtual bool eventFilter( QObject* o, QEvent* e );
bool manage( Window w, bool isMapped, bool useCursorPos );
bool manage( Window w, bool isMapped );
void releaseWindow( bool on_shutdown = false );

View file

@ -318,7 +318,7 @@ bool Workspace::workspaceEvent( XEvent * e )
// if ( e->xmaprequest.parent == root ) { //###TODO store previously destroyed client ids
if ( addSystemTrayWin( e->xmaprequest.window ) )
return TRUE;
c = createClient( e->xmaprequest.window, false, options->xineramaPlacementEnabled );
c = createClient( e->xmaprequest.window, false );
if ( c != NULL && root != qt_xrootwin() )
{ // TODO what is this?
// TODO may use QWidget::create

View file

@ -33,7 +33,7 @@ namespace KWinInternal
reparenting, initial geometry, initial state, placement, etc.
Returns false if KWin is not going to manage this window.
*/
bool Client::manage( Window w, bool isMapped, bool useCursorPos )
bool Client::manage( Window w, bool isMapped )
{
XWindowAttributes attr;
if( !XGetWindowAttributes(qt_xdisplay(), w, &attr))
@ -181,7 +181,11 @@ bool Client::manage( Window w, bool isMapped, bool useCursorPos )
if ( session )
geom = session->geometry;
QRect area = workspace()->clientArea( PlacementArea, useCursorPos ? QCursor::pos() : geom.center(), desktop());
QRect area;
if( !isMapped && options->xineramaPlacementEnabled )
area = workspace()->clientArea( PlacementArea, QCursor::pos(), desktop());
else
area = workspace()->clientArea( PlacementArea, geom.center(), desktop());
// if it's noborder window, and has size of one screen or the whole desktop geometry, it's fullscreen hack
if( ( geom.size() == workspace()->clientArea( FullArea, geom.center(), desktop()).size()

View file

@ -403,11 +403,11 @@ Workspace::~Workspace()
_self = 0;
}
Client* Workspace::createClient( Window w, bool is_mapped, bool use_cursor_pos )
Client* Workspace::createClient( Window w, bool is_mapped )
{
StackingUpdatesBlocker blocker( this );
Client* c = new Client( this );
if( !c->manage( w, is_mapped, use_cursor_pos ))
if( !c->manage( w, is_mapped ))
{
Client::deleteClient( c, Allowed );
return NULL;

View file

@ -346,7 +346,7 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine
void updateToolWindows( bool also_hide );
// this is the right way to create a new client
Client* createClient( Window w, bool is_mapped, bool use_cursor_pos = false );
Client* createClient( Window w, bool is_mapped );
void addClient( Client* c, allowed_t );
Window findSpecialEventWindow( XEvent* e );