Reimplement Xinerama placement. Patch from Balaji Ramani.

CCMAIL: balaji@yablibli.com

svn path=/trunk/kdebase/kwin/; revision=268719
icc-effect-5.14.5
George Staikos 2003-11-21 23:00:38 +00:00
parent 528b0ed6d7
commit 875fc62836
5 changed files with 7 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 manage( Window w, bool isMapped, bool useCursorPos );
void releaseWindow( bool on_shutdown = false );

View File

@ -317,7 +317,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 );
c = createClient( e->xmaprequest.window, false, true );
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 Client::manage( Window w, bool isMapped, bool useCursorPos )
{
XWindowAttributes attr;
if( !XGetWindowAttributes(qt_xdisplay(), w, &attr))
@ -181,7 +181,7 @@ bool Client::manage( Window w, bool isMapped )
if ( session )
geom = session->geometry;
QRect area = workspace()->clientArea( PlacementArea, geom.center(), desktop());
QRect area = workspace()->clientArea( PlacementArea, useCursorPos ? QCursor::pos() : 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 )
Client* Workspace::createClient( Window w, bool is_mapped, bool use_cursor_pos )
{
StackingUpdatesBlocker blocker( this );
Client* c = new Client( this );
if( !c->manage( w, is_mapped ))
if( !c->manage( w, is_mapped, use_cursor_pos ))
{
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 );
Client* createClient( Window w, bool is_mapped, bool use_cursor_pos = false );
void addClient( Client* c, allowed_t );
Window findSpecialEventWindow( XEvent* e );