2000-05-07 20:38:11 +00:00
|
|
|
/*****************************************************************
|
2003-09-16 19:28:03 +00:00
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
2000-05-07 20:38:11 +00:00
|
|
|
|
|
|
|
Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
|
2003-09-16 19:28:03 +00:00
|
|
|
Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
|
|
|
|
|
|
|
|
You can Freely distribute this program under the GNU General Public
|
|
|
|
License. See the file "COPYING" for the exact licensing terms.
|
2000-05-07 20:38:11 +00:00
|
|
|
******************************************************************/
|
2003-09-16 19:28:03 +00:00
|
|
|
|
2002-07-26 20:30:36 +00:00
|
|
|
#ifndef KWIN_CLIENT_H
|
|
|
|
#define KWIN_CLIENT_H
|
1999-08-19 23:26:42 +00:00
|
|
|
|
|
|
|
#include <qframe.h>
|
2006-05-13 16:33:18 +00:00
|
|
|
#include <QPixmap>
|
2003-09-16 19:28:03 +00:00
|
|
|
#include <netwm.h>
|
|
|
|
#include <kdebug.h>
|
|
|
|
#include <assert.h>
|
2005-01-10 09:56:21 +00:00
|
|
|
#include <kshortcut.h>
|
1999-08-19 23:26:42 +00:00
|
|
|
#include <X11/X.h>
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xutil.h>
|
2003-09-16 19:28:03 +00:00
|
|
|
#include <fixx11h.h>
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2004-06-18 08:57:42 +00:00
|
|
|
#include "utils.h"
|
|
|
|
#include "options.h"
|
|
|
|
#include "workspace.h"
|
|
|
|
#include "kdecoration.h"
|
|
|
|
#include "rules.h"
|
2006-07-04 20:02:07 +00:00
|
|
|
#include "toplevel.h"
|
2004-06-18 08:57:42 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
class QTimer;
|
|
|
|
class KProcess;
|
|
|
|
class KStartupInfoData;
|
2001-02-20 01:20:38 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
namespace KWinInternal
|
|
|
|
{
|
2001-02-20 01:20:38 +00:00
|
|
|
|
1999-08-19 23:26:42 +00:00
|
|
|
class Workspace;
|
|
|
|
class Client;
|
2000-06-08 17:05:51 +00:00
|
|
|
class WinInfo;
|
2003-09-16 19:28:03 +00:00
|
|
|
class SessionInfo;
|
|
|
|
class Bridge;
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2006-07-04 20:02:07 +00:00
|
|
|
class Client
|
|
|
|
: public Toplevel
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
1999-08-19 23:26:42 +00:00
|
|
|
Q_OBJECT
|
2003-09-16 19:28:03 +00:00
|
|
|
public:
|
|
|
|
Client( Workspace *ws );
|
|
|
|
Window window() const;
|
|
|
|
Window frameId() const;
|
|
|
|
Window wrapperId() const;
|
|
|
|
Window decorationId() const;
|
|
|
|
|
|
|
|
const Client* transientFor() const;
|
|
|
|
Client* transientFor();
|
|
|
|
bool isTransient() const;
|
|
|
|
bool groupTransient() const;
|
2003-12-15 18:30:14 +00:00
|
|
|
bool wasOriginallyGroupTransient() const;
|
2003-12-11 09:09:38 +00:00
|
|
|
ClientList mainClients() const; // call once before loop , is not indirect
|
2003-09-16 19:28:03 +00:00
|
|
|
bool hasTransient( const Client* c, bool indirect ) const;
|
2003-12-11 09:09:38 +00:00
|
|
|
const ClientList& transients() const; // is not indirect
|
2003-09-16 19:28:03 +00:00
|
|
|
void checkTransient( Window w );
|
|
|
|
Client* findModal();
|
|
|
|
const Group* group() const;
|
|
|
|
Group* group();
|
2004-04-29 14:13:08 +00:00
|
|
|
void checkGroup( Group* gr = NULL, bool force = false );
|
2003-09-16 19:28:03 +00:00
|
|
|
// prefer isXXX() instead
|
2004-05-31 14:04:49 +00:00
|
|
|
NET::WindowType windowType( bool direct = false, int supported_types = SUPPORTED_WINDOW_TYPES_MASK ) const;
|
2004-05-28 13:51:11 +00:00
|
|
|
const WindowRules* rules() const;
|
2005-06-07 15:31:15 +00:00
|
|
|
void removeRule( Rules* r );
|
|
|
|
void setupWindowRules( bool ignore_temporary );
|
|
|
|
void applyWindowRules();
|
2003-09-16 19:28:03 +00:00
|
|
|
|
2003-11-10 18:08:04 +00:00
|
|
|
QSize minSize() const;
|
2004-05-31 14:15:33 +00:00
|
|
|
QSize maxSize() const;
|
2003-09-16 19:28:03 +00:00
|
|
|
QPoint clientPos() const; // inside of geometry()
|
|
|
|
QSize clientSize() const;
|
|
|
|
|
2003-12-18 12:20:22 +00:00
|
|
|
bool windowEvent( XEvent* e );
|
2003-09-19 11:11:07 +00:00
|
|
|
virtual bool eventFilter( QObject* o, QEvent* e );
|
2003-09-16 19:28:03 +00:00
|
|
|
|
2003-11-24 15:05:50 +00:00
|
|
|
bool manage( Window w, bool isMapped );
|
2003-09-16 19:28:03 +00:00
|
|
|
|
|
|
|
void releaseWindow( bool on_shutdown = false );
|
|
|
|
|
2003-11-24 14:26:11 +00:00
|
|
|
enum Sizemode // how to resize the window in order to obey constains (mainly aspect ratios)
|
|
|
|
{
|
|
|
|
SizemodeAny,
|
|
|
|
SizemodeFixedW, // try not to affect width
|
|
|
|
SizemodeFixedH, // try not to affect height
|
2005-06-08 18:07:27 +00:00
|
|
|
SizemodeMax // try not to make it larger in either direction
|
2003-11-24 14:26:11 +00:00
|
|
|
};
|
|
|
|
QSize adjustedSize( const QSize&, Sizemode mode = SizemodeAny ) const;
|
2005-06-14 15:35:44 +00:00
|
|
|
QSize adjustedSize() const;
|
2003-09-16 19:28:03 +00:00
|
|
|
|
|
|
|
QPixmap icon() const;
|
|
|
|
QPixmap miniIcon() const;
|
|
|
|
|
|
|
|
bool isActive() const;
|
2006-07-04 23:30:05 +00:00
|
|
|
void setActive( bool );
|
2003-09-16 19:28:03 +00:00
|
|
|
|
|
|
|
int desktop() const;
|
|
|
|
void setDesktop( int );
|
2003-11-13 15:57:18 +00:00
|
|
|
bool isOnDesktop( int d ) const;
|
2003-09-16 19:28:03 +00:00
|
|
|
bool isOnCurrentDesktop() const;
|
|
|
|
bool isOnAllDesktops() const;
|
|
|
|
void setOnAllDesktops( bool set );
|
|
|
|
|
2003-10-10 13:00:01 +00:00
|
|
|
// !isMinimized() && not hidden, i.e. normally visible on some virtual desktop
|
|
|
|
bool isShown( bool shaded_is_shown ) const;
|
2003-09-16 19:28:03 +00:00
|
|
|
|
2003-11-25 15:26:50 +00:00
|
|
|
bool isShade() const; // true only for ShadeNormal
|
|
|
|
ShadeMode shadeMode() const; // prefer isShade()
|
2003-09-16 19:28:03 +00:00
|
|
|
void setShade( ShadeMode mode );
|
|
|
|
bool isShadeable() const;
|
|
|
|
|
|
|
|
bool isMinimized() const;
|
|
|
|
bool isMaximizable() const;
|
|
|
|
QRect geometryRestore() const;
|
2005-08-16 18:41:06 +00:00
|
|
|
MaximizeMode maximizeModeRestore() const;
|
2003-09-16 19:28:03 +00:00
|
|
|
MaximizeMode maximizeMode() const;
|
|
|
|
bool isMinimizable() const;
|
|
|
|
void setMaximize( bool vertically, bool horizontally );
|
|
|
|
|
|
|
|
void setFullScreen( bool set, bool user );
|
|
|
|
bool isFullScreen() const;
|
2004-01-19 15:07:14 +00:00
|
|
|
bool isFullScreenable( bool fullscreen_hack = false ) const;
|
2003-09-16 19:28:03 +00:00
|
|
|
bool userCanSetFullScreen() const;
|
|
|
|
QRect geometryFSRestore() const { return geom_fs_restore; } // only for session saving
|
|
|
|
int fullScreenMode() const { return fullscreen_mode; } // only for session saving
|
|
|
|
|
|
|
|
bool isUserNoBorder() const;
|
|
|
|
void setUserNoBorder( bool set );
|
|
|
|
bool userCanSetNoBorder() const;
|
|
|
|
bool noBorder() const;
|
|
|
|
|
|
|
|
bool skipTaskbar( bool from_outside = false ) const;
|
|
|
|
void setSkipTaskbar( bool set, bool from_outside );
|
|
|
|
|
|
|
|
bool skipPager() const;
|
|
|
|
void setSkipPager( bool );
|
|
|
|
|
|
|
|
bool keepAbove() const;
|
|
|
|
void setKeepAbove( bool );
|
|
|
|
bool keepBelow() const;
|
|
|
|
void setKeepBelow( bool );
|
|
|
|
Layer layer() const;
|
|
|
|
Layer belongsToLayer() const;
|
|
|
|
void invalidateLayer();
|
2006-04-20 14:57:10 +00:00
|
|
|
int sessionStackingOrder() const;
|
2003-09-16 19:28:03 +00:00
|
|
|
|
|
|
|
void setModal( bool modal );
|
|
|
|
bool isModal() const;
|
|
|
|
|
|
|
|
// auxiliary functions, depend on the windowType
|
|
|
|
bool wantsTabFocus() const;
|
|
|
|
bool wantsInput() const;
|
2003-10-02 08:56:44 +00:00
|
|
|
bool hasNETSupport() const;
|
2003-09-16 19:28:03 +00:00
|
|
|
bool isMovable() const;
|
|
|
|
bool isDesktop() const;
|
|
|
|
bool isDock() const;
|
|
|
|
bool isToolbar() const;
|
|
|
|
bool isTopMenu() const;
|
|
|
|
bool isMenu() const;
|
|
|
|
bool isNormalWindow() const; // normal as in 'NET::Normal or NET::Unknown non-transient'
|
|
|
|
bool isDialog() const;
|
|
|
|
bool isSplash() const;
|
|
|
|
bool isUtility() const;
|
|
|
|
// returns true for "special" windows and false for windows which are "normal"
|
|
|
|
// (normal=window which has a border, can be moved by the user, can be closed, etc.)
|
|
|
|
// true for Desktop, Dock, Splash, Override and TopMenu (and Toolbar??? - for now)
|
|
|
|
// false for Normal, Dialog, Utility and Menu (and Toolbar??? - not yet) TODO
|
|
|
|
bool isSpecialWindow() const;
|
|
|
|
|
|
|
|
bool isResizable() const;
|
|
|
|
bool isCloseable() const; // may be closed by the user (may have a close button)
|
|
|
|
|
2004-04-16 10:23:42 +00:00
|
|
|
void takeActivity( int flags, bool handled, allowed_t ); // takes ActivityFlags as arg (in utils.h)
|
|
|
|
void takeFocus( allowed_t );
|
2003-09-16 19:28:03 +00:00
|
|
|
void demandAttention( bool set = true );
|
|
|
|
|
|
|
|
void setMask( const QRegion& r, int mode = X::Unsorted );
|
2003-10-27 16:28:53 +00:00
|
|
|
QRegion mask() const;
|
2003-09-16 19:28:03 +00:00
|
|
|
|
2003-10-22 08:26:09 +00:00
|
|
|
void updateDecoration( bool check_workspace_pos, bool force = false );
|
2003-09-16 19:28:03 +00:00
|
|
|
void checkBorderSizes();
|
2001-01-08 09:52:44 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
// shape extensions
|
|
|
|
bool shape() const;
|
|
|
|
void updateShape();
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2003-10-01 12:10:22 +00:00
|
|
|
void setGeometry( int x, int y, int w, int h, ForceGeometry_t force = NormalGeometrySet );
|
|
|
|
void setGeometry( const QRect& r, ForceGeometry_t force = NormalGeometrySet );
|
|
|
|
void move( int x, int y, ForceGeometry_t force = NormalGeometrySet );
|
|
|
|
void move( const QPoint & p, ForceGeometry_t force = NormalGeometrySet );
|
2003-10-02 08:57:17 +00:00
|
|
|
// plainResize() simply resizes
|
|
|
|
void plainResize( int w, int h, ForceGeometry_t force = NormalGeometrySet );
|
|
|
|
void plainResize( const QSize& s, ForceGeometry_t force = NormalGeometrySet );
|
2005-08-08 14:22:52 +00:00
|
|
|
// resizeWithChecks() resizes according to gravity, and checks workarea position
|
|
|
|
void resizeWithChecks( int w, int h, ForceGeometry_t force = NormalGeometrySet );
|
|
|
|
void resizeWithChecks( const QSize& s, ForceGeometry_t force = NormalGeometrySet );
|
2004-12-13 11:40:25 +00:00
|
|
|
void keepInArea( QRect area, bool partial = false );
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
void growHorizontal();
|
|
|
|
void shrinkHorizontal();
|
|
|
|
void growVertical();
|
|
|
|
void shrinkVertical();
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
bool providesContextHelp() const;
|
2005-01-10 09:56:21 +00:00
|
|
|
KShortcut shortcut() const;
|
2005-01-17 15:53:14 +00:00
|
|
|
void setShortcut( const QString& cut );
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2004-04-16 10:23:42 +00:00
|
|
|
bool performMouseCommand( Options::MouseCommand, QPoint globalPos, bool handled = false );
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2005-07-28 14:59:42 +00:00
|
|
|
QByteArray windowRole() const;
|
|
|
|
QByteArray sessionId();
|
|
|
|
QByteArray resourceName() const;
|
|
|
|
QByteArray resourceClass() const;
|
|
|
|
QByteArray wmCommand();
|
|
|
|
QByteArray wmClientMachine( bool use_localhost ) const;
|
2003-09-16 19:28:03 +00:00
|
|
|
Window wmClientLeader() const;
|
|
|
|
pid_t pid() const;
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2004-02-17 17:34:00 +00:00
|
|
|
QRect adjustedClientArea( const QRect& desktop, const QRect& area ) const;
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
Colormap colormap() const;
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2005-04-12 17:22:47 +00:00
|
|
|
// updates visibility depending on being shaded, virtual desktop, etc.
|
|
|
|
void updateVisibility();
|
2003-09-16 19:28:03 +00:00
|
|
|
// hides a client - basically like minimize, but without effects, it's simply hidden
|
|
|
|
void hideClient( bool hide );
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2004-05-28 13:51:11 +00:00
|
|
|
QString caption( bool full = true ) const;
|
2005-02-07 15:17:26 +00:00
|
|
|
void updateCaption();
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
void keyPressEvent( uint key_code ); // FRAME ??
|
2004-02-10 09:24:57 +00:00
|
|
|
void updateMouseGrab();
|
2004-03-05 13:39:27 +00:00
|
|
|
Window moveResizeGrabWindow() const;
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2003-10-01 12:08:53 +00:00
|
|
|
const QPoint calculateGravitation( bool invert, int gravity = 0 ) const; // FRAME public?
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
void NETMoveResize( int x_root, int y_root, NET::Direction direction );
|
2003-10-01 12:08:53 +00:00
|
|
|
void NETMoveResizeWindow( int flags, int x, int y, int width, int height );
|
2004-04-16 09:43:53 +00:00
|
|
|
void restackWindow( Window above, int detail, NET::RequestSource source, Time timestamp, bool send_event = false );
|
2003-09-30 12:49:23 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
void gotPing( Time timestamp );
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2005-07-28 14:59:42 +00:00
|
|
|
static QByteArray staticWindowRole(WId);
|
|
|
|
static QByteArray staticSessionId(WId);
|
|
|
|
static QByteArray staticWmCommand(WId);
|
|
|
|
static QByteArray staticWmClientMachine(WId);
|
2003-09-16 19:28:03 +00:00
|
|
|
static Window staticWmClientLeader(WId);
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
void checkWorkspacePosition();
|
|
|
|
void updateUserTime( Time time = CurrentTime );
|
|
|
|
Time userTime() const;
|
2003-09-30 12:49:23 +00:00
|
|
|
bool hasUserTimeSupport() const;
|
2004-03-24 19:05:49 +00:00
|
|
|
bool ignoreFocusStealing() const;
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
// does 'delete c;'
|
|
|
|
static void deleteClient( Client* c, allowed_t );
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
static bool resourceMatch( const Client* c1, const Client* c2 );
|
|
|
|
static bool belongToSameApplication( const Client* c1, const Client* c2, bool active_hack = false );
|
|
|
|
static void readIcons( Window win, QPixmap* icon, QPixmap* miniicon );
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2004-03-01 18:00:07 +00:00
|
|
|
void minimize( bool avoid_animation = false );
|
|
|
|
void unminimize( bool avoid_animation = false );
|
2003-09-16 19:28:03 +00:00
|
|
|
void closeWindow();
|
|
|
|
void killWindow();
|
|
|
|
void maximize( MaximizeMode );
|
|
|
|
void toggleShade();
|
|
|
|
void showContextHelp();
|
2005-05-06 15:20:49 +00:00
|
|
|
void cancelShadeHover();
|
2004-02-10 14:46:03 +00:00
|
|
|
void cancelAutoRaise();
|
2003-09-16 19:28:03 +00:00
|
|
|
void destroyClient();
|
2004-11-04 17:56:05 +00:00
|
|
|
void checkActiveModal();
|
2006-02-20 17:41:13 +00:00
|
|
|
bool hasStrut() const;
|
2006-07-04 20:02:07 +00:00
|
|
|
|
2004-07-27 08:35:51 +00:00
|
|
|
private slots:
|
2004-03-02 17:37:20 +00:00
|
|
|
void autoRaise();
|
|
|
|
void shadeHover();
|
2005-01-10 09:56:21 +00:00
|
|
|
void shortcutActivated();
|
2004-03-02 17:37:20 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
private:
|
|
|
|
friend class Bridge; // FRAME
|
|
|
|
virtual void processMousePressEvent( QMouseEvent* e );
|
2001-03-26 08:10:31 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
private: // TODO cleanup the order of things in the .h file
|
|
|
|
// use Workspace::createClient()
|
|
|
|
virtual ~Client(); // use destroyClient() or releaseWindow()
|
2001-05-02 20:37:30 +00:00
|
|
|
|
2003-12-15 15:10:17 +00:00
|
|
|
Position mousePosition( const QPoint& ) const;
|
|
|
|
void setCursor( Position m );
|
2003-09-16 19:28:03 +00:00
|
|
|
void setCursor( const QCursor& c );
|
1999-11-02 00:32:31 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
void animateMinimizeOrUnminimize( bool minimize );
|
|
|
|
QPixmap animationPixmap( int w );
|
1999-09-27 16:02:44 +00:00
|
|
|
// transparent stuff
|
2003-09-16 19:28:03 +00:00
|
|
|
void drawbound( const QRect& geom );
|
|
|
|
void clearbound();
|
|
|
|
void doDrawbound( const QRect& geom, bool clear );
|
1999-11-14 06:34:28 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
// handlers for X11 events
|
2003-12-18 12:20:22 +00:00
|
|
|
bool mapRequestEvent( XMapRequestEvent* e );
|
2003-09-16 19:28:03 +00:00
|
|
|
void unmapNotifyEvent( XUnmapEvent*e );
|
2003-09-19 11:16:57 +00:00
|
|
|
void destroyNotifyEvent( XDestroyWindowEvent*e );
|
2003-09-16 19:28:03 +00:00
|
|
|
void configureRequestEvent( XConfigureRequestEvent* e );
|
|
|
|
void propertyNotifyEvent( XPropertyEvent* e );
|
|
|
|
void clientMessageEvent( XClientMessageEvent* e );
|
|
|
|
void enterNotifyEvent( XCrossingEvent* e );
|
|
|
|
void leaveNotifyEvent( XCrossingEvent* e );
|
|
|
|
void visibilityNotifyEvent( XVisibilityEvent* e );
|
|
|
|
void focusInEvent( XFocusInEvent* e );
|
|
|
|
void focusOutEvent( XFocusOutEvent* e );
|
|
|
|
|
2003-12-18 12:20:22 +00:00
|
|
|
bool buttonPressEvent( Window w, int button, int state, int x, int y, int x_root, int y_root );
|
|
|
|
bool buttonReleaseEvent( Window w, int button, int state, int x, int y, int x_root, int y_root );
|
|
|
|
bool motionNotifyEvent( Window w, int state, int x, int y, int x_root, int y_root );
|
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
void processDecorationButtonPress( int button, int state, int x, int y, int x_root, int y_root );
|
|
|
|
|
2006-07-04 20:02:07 +00:00
|
|
|
protected:
|
|
|
|
virtual void debug( kdbgstream& stream ) const;
|
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
private slots:
|
|
|
|
void pingTimeout();
|
|
|
|
void processKillerExited();
|
2005-05-30 13:31:33 +00:00
|
|
|
void demandAttentionKNotify();
|
2003-09-16 19:28:03 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
// ICCCM 4.1.3.1, 4.1.4 , NETWM 2.5.1
|
|
|
|
void setMappingState( int s );
|
|
|
|
int mappingState() const;
|
|
|
|
bool isIconicState() const;
|
|
|
|
bool isNormalState() const;
|
|
|
|
bool isManaged() const; // returns false if this client is not yet managed
|
|
|
|
void updateAllowedActions( bool force = false );
|
2005-01-17 13:35:48 +00:00
|
|
|
QSize sizeForClientSize( const QSize&, Sizemode mode = SizemodeAny, bool noframe = false ) const;
|
2003-09-16 19:28:03 +00:00
|
|
|
void changeMaximize( bool horizontal, bool vertical, bool adjust );
|
2004-11-12 17:13:16 +00:00
|
|
|
void checkMaximizeGeometry();
|
2006-02-28 13:03:31 +00:00
|
|
|
int checkFullScreenHack( const QRect& geom ) const; // 0 - none, 1 - one xinerama screen, 2 - full area
|
2004-07-27 08:36:28 +00:00
|
|
|
void updateFullScreenHack( const QRect& geom );
|
2003-09-16 19:28:03 +00:00
|
|
|
void getWmNormalHints();
|
2004-07-27 08:35:51 +00:00
|
|
|
void getMotifHints();
|
2003-09-16 19:28:03 +00:00
|
|
|
void getIcons();
|
|
|
|
void getWmClientLeader();
|
2005-02-07 14:35:53 +00:00
|
|
|
void getWmClientMachine();
|
2003-09-16 19:28:03 +00:00
|
|
|
void fetchName();
|
|
|
|
void fetchIconicName();
|
2004-05-28 15:04:01 +00:00
|
|
|
QString readName() const;
|
|
|
|
void setCaption( const QString& s, bool force = false );
|
2003-11-27 14:37:55 +00:00
|
|
|
bool hasTransientInternal( const Client* c, bool indirect, ConstClientList& set ) const;
|
2004-05-28 13:51:11 +00:00
|
|
|
void updateWindowRules();
|
2004-05-31 14:25:25 +00:00
|
|
|
void finishWindowRules();
|
2005-01-17 15:53:14 +00:00
|
|
|
void setShortcutInternal( const KShortcut& cut );
|
2003-09-16 19:28:03 +00:00
|
|
|
|
2003-10-10 12:58:38 +00:00
|
|
|
void updateWorkareaDiffs();
|
2003-09-16 19:28:03 +00:00
|
|
|
void checkDirection( int new_diff, int old_diff, QRect& rect, const QRect& area );
|
|
|
|
static int computeWorkareaDiff( int left, int right, int a_left, int a_right );
|
2004-07-16 11:25:07 +00:00
|
|
|
void configureRequest( int value_mask, int rx, int ry, int rw, int rh, int gravity, bool from_tool );
|
2004-02-17 17:34:00 +00:00
|
|
|
NETExtendedStrut strut() const;
|
2004-11-29 18:46:04 +00:00
|
|
|
int checkShadeGeometry( int w, int h );
|
2005-06-08 17:16:53 +00:00
|
|
|
void postponeGeometryUpdates( bool postpone );
|
2003-09-16 19:28:03 +00:00
|
|
|
|
|
|
|
bool startMoveResize();
|
|
|
|
void finishMoveResize( bool cancel );
|
|
|
|
void leaveMoveResize();
|
2004-02-09 18:09:01 +00:00
|
|
|
void checkUnrestrictedMoveResize();
|
2003-09-24 10:55:54 +00:00
|
|
|
void handleMoveResize( int x, int y, int x_root, int y_root );
|
2003-09-16 19:28:03 +00:00
|
|
|
void positionGeometryTip();
|
|
|
|
void grabButton( int mod );
|
|
|
|
void ungrabButton( int mod );
|
|
|
|
void resetMaximize();
|
|
|
|
void resizeDecoration( const QSize& s );
|
|
|
|
|
|
|
|
void pingWindow();
|
|
|
|
void killProcess( bool ask, Time timestamp = CurrentTime );
|
2003-10-10 11:23:42 +00:00
|
|
|
void updateUrgency();
|
2004-04-16 10:23:42 +00:00
|
|
|
static void sendClientMessage( Window w, Atom a, Atom protocol,
|
|
|
|
long data1 = 0, long data2 = 0, long data3 = 0 );
|
2003-09-16 19:28:03 +00:00
|
|
|
|
2003-12-11 17:41:47 +00:00
|
|
|
void embedClient( Window w, const XWindowAttributes &attr );
|
2003-09-16 19:28:03 +00:00
|
|
|
void detectNoBorder();
|
2003-10-22 08:26:09 +00:00
|
|
|
void destroyDecoration();
|
2005-06-21 09:00:28 +00:00
|
|
|
void updateFrameExtents();
|
2003-09-16 19:28:03 +00:00
|
|
|
|
|
|
|
void rawShow(); // just shows it
|
|
|
|
void rawHide(); // just hides it
|
|
|
|
|
2004-05-26 09:24:14 +00:00
|
|
|
Time readUserTimeMapTimestamp( const KStartupInfoId* asn_id, const KStartupInfoData* asn_data,
|
2004-05-28 13:51:11 +00:00
|
|
|
bool session ) const;
|
2003-09-16 19:28:03 +00:00
|
|
|
Time readUserCreationTime() const;
|
|
|
|
static bool sameAppWindowRoleMatch( const Client* c1, const Client* c2, bool active_hack );
|
|
|
|
void startupIdChanged();
|
2006-07-04 20:02:07 +00:00
|
|
|
static bool hasShape( Window w );
|
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
Window client;
|
|
|
|
Window wrapper;
|
|
|
|
KDecoration* decoration;
|
|
|
|
Bridge* bridge;
|
|
|
|
int desk;
|
|
|
|
bool buttonDown;
|
|
|
|
bool moveResizeMode;
|
|
|
|
bool move_faked_activity;
|
2004-03-05 13:39:27 +00:00
|
|
|
Window move_resize_grab_window;
|
2003-09-16 19:28:03 +00:00
|
|
|
bool unrestrictedMoveResize;
|
|
|
|
bool isMove() const
|
|
|
|
{
|
2003-12-15 15:10:17 +00:00
|
|
|
return moveResizeMode && mode == PositionCenter;
|
2003-09-16 19:28:03 +00:00
|
|
|
}
|
|
|
|
bool isResize() const
|
|
|
|
{
|
2003-12-15 15:10:17 +00:00
|
|
|
return moveResizeMode && mode != PositionCenter;
|
2003-09-16 19:28:03 +00:00
|
|
|
}
|
|
|
|
|
2003-12-15 15:10:17 +00:00
|
|
|
Position mode;
|
2003-09-16 19:28:03 +00:00
|
|
|
QPoint moveOffset;
|
|
|
|
QPoint invertedMoveOffset;
|
|
|
|
QRect moveResizeGeom;
|
|
|
|
QRect initialMoveResizeGeom;
|
|
|
|
XSizeHints xSizeHint;
|
|
|
|
void sendSyntheticConfigureNotify();
|
|
|
|
int mapping_state;
|
|
|
|
void readTransient();
|
|
|
|
Window verifyTransientFor( Window transient_for, bool set );
|
|
|
|
void addTransient( Client* cl );
|
|
|
|
void removeTransient( Client* cl );
|
|
|
|
void removeFromMainClients();
|
2003-09-19 14:53:39 +00:00
|
|
|
void cleanGrouping();
|
2003-09-16 19:28:03 +00:00
|
|
|
void checkGroupTransients();
|
|
|
|
void setTransient( Window new_transient_for_id );
|
|
|
|
Client* transient_for;
|
|
|
|
Window transient_for_id;
|
|
|
|
Window original_transient_for_id;
|
|
|
|
ClientList transients_list; // SELI make this ordered in stacking order?
|
|
|
|
ShadeMode shade_mode;
|
|
|
|
uint active :1;
|
2005-05-11 14:46:23 +00:00
|
|
|
uint deleting : 1; // true when doing cleanup and destroying the client
|
2003-09-16 19:28:03 +00:00
|
|
|
uint keep_above : 1; // NET::KeepAbove (was stays_on_top)
|
|
|
|
uint is_shape :1;
|
|
|
|
uint skip_taskbar :1;
|
|
|
|
uint original_skip_taskbar :1; // unaffected by KWin
|
|
|
|
uint Pdeletewindow :1; // does the window understand the DeleteWindow protocol?
|
|
|
|
uint Ptakefocus :1;// does the window understand the TakeFocus protocol?
|
2004-04-16 10:23:42 +00:00
|
|
|
uint Ptakeactivity : 1; // does it support _NET_WM_TAKE_ACTIVITY
|
2003-09-16 19:28:03 +00:00
|
|
|
uint Pcontexthelp : 1; // does the window understand the ContextHelp protocol?
|
|
|
|
uint Pping : 1; // does it support _NET_WM_PING?
|
|
|
|
uint input :1; // does the window want input in its wm_hints
|
|
|
|
uint skip_pager : 1;
|
2004-07-27 08:35:51 +00:00
|
|
|
uint motif_noborder : 1;
|
2003-09-19 11:14:16 +00:00
|
|
|
uint motif_may_resize : 1;
|
|
|
|
uint motif_may_move :1;
|
|
|
|
uint motif_may_close : 1;
|
2003-09-16 19:28:03 +00:00
|
|
|
uint keep_below : 1; // NET::KeepBelow
|
|
|
|
uint minimized : 1;
|
|
|
|
uint hidden : 1; // forcibly hidden by calling hide()
|
|
|
|
uint modal : 1; // NET::Modal
|
|
|
|
uint noborder : 1;
|
|
|
|
uint user_noborder : 1;
|
|
|
|
uint not_obscured : 1;
|
2003-10-10 11:23:42 +00:00
|
|
|
uint urgency : 1; // XWMHints, UrgencyHint
|
2004-03-24 19:05:49 +00:00
|
|
|
uint ignore_focus_stealing : 1; // don't apply focus stealing prevention to this client
|
2005-05-30 13:31:33 +00:00
|
|
|
uint demands_attention : 1;
|
2004-06-18 08:57:42 +00:00
|
|
|
WindowRules client_rules;
|
2003-09-16 19:28:03 +00:00
|
|
|
void getWMHints();
|
|
|
|
void readIcons();
|
|
|
|
void getWindowProtocols();
|
|
|
|
QPixmap icon_pix;
|
|
|
|
QPixmap miniicon_pix;
|
|
|
|
QCursor cursor;
|
|
|
|
// FullScreenHack - non-NETWM fullscreen (noborder,size of desktop)
|
|
|
|
// DON'T reorder - saved to config files !!!
|
|
|
|
enum FullScreenMode { FullScreenNone, FullScreenNormal, FullScreenHack };
|
|
|
|
FullScreenMode fullscreen_mode;
|
|
|
|
MaximizeMode max_mode;
|
|
|
|
QRect geom_restore;
|
|
|
|
QRect geom_fs_restore;
|
2005-08-16 18:41:06 +00:00
|
|
|
MaximizeMode maxmode_restore;
|
2003-09-16 19:28:03 +00:00
|
|
|
int workarea_diff_x, workarea_diff_y;
|
|
|
|
WinInfo* info;
|
|
|
|
QTimer* autoRaiseTimer;
|
|
|
|
QTimer* shadeHoverTimer;
|
|
|
|
Colormap cmap;
|
2005-07-28 14:59:42 +00:00
|
|
|
QByteArray resource_name;
|
|
|
|
QByteArray resource_class;
|
|
|
|
QByteArray client_machine;
|
2003-09-16 19:28:03 +00:00
|
|
|
QString cap_normal, cap_iconic, cap_suffix;
|
|
|
|
WId wmClientLeaderWin;
|
2005-07-28 14:59:42 +00:00
|
|
|
QByteArray window_role;
|
2003-09-16 19:28:03 +00:00
|
|
|
Group* in_group;
|
|
|
|
Window window_group;
|
|
|
|
Layer in_layer;
|
|
|
|
QTimer* ping_timer;
|
|
|
|
KProcess* process_killer;
|
|
|
|
Time ping_timestamp;
|
|
|
|
Time user_time;
|
|
|
|
unsigned long allowed_actions;
|
|
|
|
QSize client_size;
|
2005-06-08 17:16:53 +00:00
|
|
|
int postpone_geometry_updates; // >0 - new geometry is remembered, but not actually set
|
|
|
|
bool pending_geometry_update;
|
2003-09-24 11:01:14 +00:00
|
|
|
bool shade_geometry_change;
|
2003-09-16 19:28:03 +00:00
|
|
|
int border_left, border_right, border_top, border_bottom;
|
2003-10-27 16:28:53 +00:00
|
|
|
QRegion _mask;
|
2004-08-04 12:19:50 +00:00
|
|
|
static bool check_active_modal; // see Client::checkActiveModal()
|
2005-01-10 09:56:21 +00:00
|
|
|
KShortcut _shortcut;
|
2006-04-20 14:57:10 +00:00
|
|
|
int sm_stacking_order;
|
2003-09-16 19:28:03 +00:00
|
|
|
friend struct FetchNameInternalPredicate;
|
2004-03-24 19:05:49 +00:00
|
|
|
friend struct CheckIgnoreFocusStealingProcedure;
|
2004-06-11 15:12:29 +00:00
|
|
|
friend struct ResetupRulesProcedure;
|
2005-06-08 17:16:53 +00:00
|
|
|
friend class GeometryUpdatesPostponer;
|
2003-09-16 19:28:03 +00:00
|
|
|
void show() { assert( false ); } // SELI remove after Client is no longer QWidget
|
|
|
|
void hide() { assert( false ); }
|
2005-05-30 13:31:33 +00:00
|
|
|
QTimer* demandAttentionKNotifyTimer;
|
1999-08-19 23:26:42 +00:00
|
|
|
};
|
|
|
|
|
2005-06-08 17:16:53 +00:00
|
|
|
// helper for Client::postponeGeometryUpdates() being called in pairs (true/false)
|
|
|
|
class GeometryUpdatesPostponer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
GeometryUpdatesPostponer( Client* c )
|
|
|
|
: cl( c ) { cl->postponeGeometryUpdates( true ); }
|
|
|
|
~GeometryUpdatesPostponer()
|
|
|
|
{ cl->postponeGeometryUpdates( false ); }
|
|
|
|
private:
|
|
|
|
Client* cl;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
// NET WM Protocol handler class
|
|
|
|
class WinInfo : public NETWinInfo
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
typedef KWinInternal::Client Client; // because of NET::Client
|
|
|
|
public:
|
|
|
|
WinInfo( Client* c, Display * display, Window window,
|
|
|
|
Window rwin, const unsigned long pr[], int pr_size );
|
|
|
|
virtual void changeDesktop(int desktop);
|
|
|
|
virtual void changeState( unsigned long state, unsigned long mask );
|
|
|
|
private:
|
|
|
|
Client * m_client;
|
|
|
|
};
|
2000-06-28 13:20:42 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
inline Window Client::window() const
|
|
|
|
{
|
|
|
|
return client;
|
|
|
|
}
|
2000-06-23 16:26:44 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
inline Window Client::frameId() const
|
|
|
|
{
|
2006-07-04 20:02:07 +00:00
|
|
|
return handle();
|
2003-09-16 19:28:03 +00:00
|
|
|
}
|
2000-06-23 16:26:44 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
inline Window Client::wrapperId() const
|
|
|
|
{
|
|
|
|
return wrapper;
|
|
|
|
}
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
inline Window Client::decorationId() const
|
|
|
|
{
|
|
|
|
return decoration != NULL ? decoration->widget()->winId() : None;
|
|
|
|
}
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
inline const Client* Client::transientFor() const
|
|
|
|
{
|
1999-08-19 23:26:42 +00:00
|
|
|
return transient_for;
|
2003-09-16 19:28:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline Client* Client::transientFor()
|
|
|
|
{
|
|
|
|
return transient_for;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool Client::groupTransient() const
|
|
|
|
{
|
|
|
|
return transient_for_id == workspace()->rootWin();
|
|
|
|
}
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2003-12-15 18:30:14 +00:00
|
|
|
// needed because verifyTransientFor() may set transient_for_id to root window,
|
|
|
|
// if the original value has a problem (window doesn't exist, etc.)
|
|
|
|
inline bool Client::wasOriginallyGroupTransient() const
|
|
|
|
{
|
|
|
|
return original_transient_for_id == workspace()->rootWin();
|
|
|
|
}
|
|
|
|
|
1999-11-28 20:10:58 +00:00
|
|
|
inline bool Client::isTransient() const
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
|
|
|
return transient_for_id != None;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline const ClientList& Client::transients() const
|
|
|
|
{
|
|
|
|
return transients_list;
|
|
|
|
}
|
1999-11-28 20:10:58 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
inline const Group* Client::group() const
|
|
|
|
{
|
|
|
|
return in_group;
|
|
|
|
}
|
1999-11-28 20:10:58 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
inline Group* Client::group()
|
|
|
|
{
|
|
|
|
return in_group;
|
|
|
|
}
|
1999-11-28 20:10:58 +00:00
|
|
|
|
1999-08-19 23:26:42 +00:00
|
|
|
inline int Client::mappingState() const
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
|
|
|
return mapping_state;
|
|
|
|
}
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2005-07-28 14:59:42 +00:00
|
|
|
inline QByteArray Client::resourceName() const
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
2004-02-23 12:47:28 +00:00
|
|
|
return resource_name; // it is always lowercase
|
2003-09-16 19:28:03 +00:00
|
|
|
}
|
|
|
|
|
2005-07-28 14:59:42 +00:00
|
|
|
inline QByteArray Client::resourceClass() const
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
2004-02-23 12:47:28 +00:00
|
|
|
return resource_class; // it is always lowercase
|
2003-09-16 19:28:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline
|
|
|
|
bool Client::isMinimized() const
|
|
|
|
{
|
|
|
|
return minimized;
|
|
|
|
}
|
1999-08-19 23:26:42 +00:00
|
|
|
|
|
|
|
inline bool Client::isActive() const
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
1999-08-19 23:26:42 +00:00
|
|
|
return active;
|
2003-09-16 19:28:03 +00:00
|
|
|
}
|
1999-08-19 23:26:42 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
Returns the virtual desktop within the workspace() the client window
|
2002-12-30 20:34:38 +00:00
|
|
|
is located in, 0 if it isn't located on any special desktop (not mapped yet),
|
2003-09-16 19:28:03 +00:00
|
|
|
or NET::OnAllDesktops. Do not use desktop() directly, use
|
2002-12-30 20:34:38 +00:00
|
|
|
isOnDesktop() instead.
|
1999-08-19 23:26:42 +00:00
|
|
|
*/
|
|
|
|
inline int Client::desktop() const
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
1999-08-19 23:26:42 +00:00
|
|
|
return desk;
|
2003-09-16 19:28:03 +00:00
|
|
|
}
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
inline bool Client::isOnAllDesktops() const
|
|
|
|
{
|
|
|
|
return desk == NET::OnAllDesktops;
|
|
|
|
}
|
1999-08-19 23:26:42 +00:00
|
|
|
/*!
|
2003-09-16 19:28:03 +00:00
|
|
|
Returns whether the client is on the virtual desktop \a d.
|
2006-02-19 01:33:48 +00:00
|
|
|
This is always true for onAllDesktops clients.
|
1999-08-19 23:26:42 +00:00
|
|
|
*/
|
|
|
|
inline bool Client::isOnDesktop( int d ) const
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
2003-11-13 15:57:18 +00:00
|
|
|
return desk == d || /*desk == 0 ||*/ isOnAllDesktops();
|
2003-09-16 19:28:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline
|
2003-10-10 13:00:01 +00:00
|
|
|
bool Client::isShown( bool shaded_is_shown ) const
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
2003-10-10 13:00:01 +00:00
|
|
|
return !isMinimized() && ( !isShade() || shaded_is_shown ) && !hidden;
|
2003-09-16 19:28:03 +00:00
|
|
|
}
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
inline
|
|
|
|
bool Client::isShade() const
|
|
|
|
{
|
|
|
|
return shade_mode == ShadeNormal;
|
|
|
|
}
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2003-11-25 15:26:50 +00:00
|
|
|
inline
|
2004-06-18 08:57:42 +00:00
|
|
|
ShadeMode Client::shadeMode() const
|
2003-11-25 15:26:50 +00:00
|
|
|
{
|
|
|
|
return shade_mode;
|
|
|
|
}
|
|
|
|
|
1999-08-19 23:26:42 +00:00
|
|
|
inline QPixmap Client::icon() const
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
1999-08-19 23:26:42 +00:00
|
|
|
return icon_pix;
|
2003-09-16 19:28:03 +00:00
|
|
|
}
|
1999-08-19 23:26:42 +00:00
|
|
|
|
|
|
|
inline QPixmap Client::miniIcon() const
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
1999-08-19 23:26:42 +00:00
|
|
|
return miniicon_pix;
|
2003-09-16 19:28:03 +00:00
|
|
|
}
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2000-08-30 14:27:30 +00:00
|
|
|
inline QRect Client::geometryRestore() const
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
2000-08-30 14:27:30 +00:00
|
|
|
return geom_restore;
|
2003-09-16 19:28:03 +00:00
|
|
|
}
|
2000-08-30 14:27:30 +00:00
|
|
|
|
2005-08-16 18:41:06 +00:00
|
|
|
inline Client::MaximizeMode Client::maximizeModeRestore() const
|
|
|
|
{
|
|
|
|
return maxmode_restore;
|
|
|
|
}
|
|
|
|
|
2000-08-30 14:27:30 +00:00
|
|
|
inline Client::MaximizeMode Client::maximizeMode() const
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
2000-08-30 14:27:30 +00:00
|
|
|
return max_mode;
|
2003-09-16 19:28:03 +00:00
|
|
|
}
|
2000-06-28 13:20:42 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
inline bool Client::skipTaskbar( bool from_outside ) const
|
|
|
|
{
|
|
|
|
return from_outside ? original_skip_taskbar : skip_taskbar;
|
|
|
|
}
|
2001-03-12 21:32:13 +00:00
|
|
|
|
2001-05-02 20:37:30 +00:00
|
|
|
inline bool Client::skipPager() const
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
2001-05-02 20:37:30 +00:00
|
|
|
return skip_pager;
|
2003-09-16 19:28:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline bool Client::keepAbove() const
|
|
|
|
{
|
|
|
|
return keep_above;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool Client::keepBelow() const
|
|
|
|
{
|
|
|
|
return keep_below;
|
|
|
|
}
|
2001-05-02 20:37:30 +00:00
|
|
|
|
1999-11-12 03:11:19 +00:00
|
|
|
inline bool Client::shape() const
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
1999-11-12 03:11:19 +00:00
|
|
|
return is_shape;
|
2003-09-16 19:28:03 +00:00
|
|
|
}
|
1999-11-12 03:11:19 +00:00
|
|
|
|
2000-09-25 15:30:51 +00:00
|
|
|
|
|
|
|
inline bool Client::isFullScreen() const
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
|
|
|
return fullscreen_mode != FullScreenNone;
|
|
|
|
}
|
2000-05-03 00:04:26 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
inline bool Client::isModal() const
|
|
|
|
{
|
|
|
|
return modal;
|
|
|
|
}
|
2000-08-30 14:27:30 +00:00
|
|
|
|
2003-10-02 08:56:44 +00:00
|
|
|
inline bool Client::hasNETSupport() const
|
|
|
|
{
|
|
|
|
return info->hasNETSupport();
|
|
|
|
}
|
|
|
|
|
2000-08-30 14:27:30 +00:00
|
|
|
inline Colormap Client::colormap() const
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
2000-08-30 14:27:30 +00:00
|
|
|
return cmap;
|
2003-09-16 19:28:03 +00:00
|
|
|
}
|
2000-08-30 14:27:30 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
inline pid_t Client::pid() const
|
|
|
|
{
|
|
|
|
return info->pid();
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void Client::invalidateLayer()
|
|
|
|
{
|
|
|
|
in_layer = UnknownLayer;
|
|
|
|
}
|
|
|
|
|
2006-04-20 14:57:10 +00:00
|
|
|
inline int Client::sessionStackingOrder() const
|
|
|
|
{
|
|
|
|
return sm_stacking_order;
|
|
|
|
}
|
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
inline bool Client::isIconicState() const
|
|
|
|
{
|
|
|
|
return mapping_state == IconicState;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool Client::isNormalState() const
|
|
|
|
{
|
|
|
|
return mapping_state == NormalState;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool Client::isManaged() const
|
|
|
|
{
|
|
|
|
return mapping_state != WithdrawnState;
|
|
|
|
}
|
|
|
|
|
2005-07-28 14:59:42 +00:00
|
|
|
inline QByteArray Client::windowRole() const
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
|
|
|
return window_role;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline QPoint Client::clientPos() const
|
|
|
|
{
|
|
|
|
return QPoint( border_left, border_top );
|
|
|
|
}
|
|
|
|
|
|
|
|
inline QSize Client::clientSize() const
|
|
|
|
{
|
|
|
|
return client_size;
|
|
|
|
}
|
|
|
|
|
2003-10-01 12:10:22 +00:00
|
|
|
inline void Client::setGeometry( const QRect& r, ForceGeometry_t force )
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
|
|
|
setGeometry( r.x(), r.y(), r.width(), r.height(), force );
|
|
|
|
}
|
|
|
|
|
2003-10-01 12:10:22 +00:00
|
|
|
inline void Client::move( const QPoint & p, ForceGeometry_t force )
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
|
|
|
move( p.x(), p.y(), force );
|
|
|
|
}
|
|
|
|
|
2003-10-02 08:57:17 +00:00
|
|
|
inline void Client::plainResize( const QSize& s, ForceGeometry_t force )
|
2003-09-16 19:28:03 +00:00
|
|
|
{
|
2003-10-02 08:57:17 +00:00
|
|
|
plainResize( s.width(), s.height(), force );
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void Client::resizeWithChecks( const QSize& s, ForceGeometry_t force )
|
|
|
|
{
|
|
|
|
resizeWithChecks( s.width(), s.height(), force );
|
2003-09-16 19:28:03 +00:00
|
|
|
}
|
|
|
|
|
2003-09-30 12:49:23 +00:00
|
|
|
inline bool Client::hasUserTimeSupport() const
|
|
|
|
{
|
|
|
|
return info->userTime() != -1U;
|
|
|
|
}
|
2004-03-24 19:05:49 +00:00
|
|
|
|
|
|
|
inline bool Client::ignoreFocusStealing() const
|
|
|
|
{
|
|
|
|
return ignore_focus_stealing;
|
|
|
|
}
|
|
|
|
|
2004-05-28 13:51:11 +00:00
|
|
|
inline const WindowRules* Client::rules() const
|
|
|
|
{
|
2004-06-18 08:57:42 +00:00
|
|
|
return &client_rules;
|
2004-05-28 13:51:11 +00:00
|
|
|
}
|
|
|
|
|
2006-07-04 20:02:07 +00:00
|
|
|
KWIN_PROCEDURE( CheckIgnoreFocusStealingProcedure, Client, cl->ignore_focus_stealing = options->checkIgnoreFocusStealing( cl ));
|
2003-10-27 16:28:53 +00:00
|
|
|
|
2004-03-05 13:39:27 +00:00
|
|
|
inline Window Client::moveResizeGrabWindow() const
|
|
|
|
{
|
|
|
|
return move_resize_grab_window;
|
|
|
|
}
|
|
|
|
|
2005-01-10 09:56:21 +00:00
|
|
|
inline KShortcut Client::shortcut() const
|
|
|
|
{
|
|
|
|
return _shortcut;
|
|
|
|
}
|
|
|
|
|
2005-06-07 15:31:15 +00:00
|
|
|
inline void Client::removeRule( Rules* rule )
|
|
|
|
{
|
|
|
|
client_rules.remove( rule );
|
|
|
|
}
|
|
|
|
|
2006-07-04 20:02:07 +00:00
|
|
|
KWIN_COMPARE_PREDICATE( WindowMatchPredicate, Client, Window, cl->window() == value );
|
|
|
|
KWIN_COMPARE_PREDICATE( FrameIdMatchPredicate, Client, Window, cl->frameId() == value );
|
|
|
|
KWIN_COMPARE_PREDICATE( WrapperIdMatchPredicate, Client, Window, cl->wrapperId() == value );
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
} // namespace
|
2001-02-20 01:20:38 +00:00
|
|
|
|
1999-08-19 23:26:42 +00:00
|
|
|
#endif
|