• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KWin

client.h

Go to the documentation of this file.
00001 /********************************************************************
00002  KWin - the KDE window manager
00003  This file is part of the KDE project.
00004 
00005 Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
00006 Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
00007 
00008 This program is free software; you can redistribute it and/or modify
00009 it under the terms of the GNU General Public License as published by
00010 the Free Software Foundation; either version 2 of the License, or
00011 (at your option) any later version.
00012 
00013 This program is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 GNU General Public License for more details.
00017 
00018 You should have received a copy of the GNU General Public License
00019 along with this program.  If not, see <http://www.gnu.org/licenses/>.
00020 *********************************************************************/
00021 
00022 #ifndef KWIN_CLIENT_H
00023 #define KWIN_CLIENT_H
00024 
00025 #include <config-X11.h>
00026 
00027 #include <QFrame>
00028 #include <QPixmap>
00029 #include <netwm.h>
00030 #include <kdebug.h>
00031 #include <assert.h>
00032 #include <kshortcut.h>
00033 #include <X11/X.h>
00034 #include <X11/Xlib.h>
00035 #include <X11/Xutil.h>
00036 #include <fixx11h.h>
00037 
00038 #include "utils.h"
00039 #include "options.h"
00040 #include "workspace.h"
00041 #include "kdecoration.h"
00042 #include "rules.h"
00043 #include "toplevel.h"
00044 
00045 #ifdef HAVE_XSYNC
00046 #include <X11/extensions/sync.h>
00047 #endif
00048 
00049 class QProcess;
00050 class QTimer;
00051 class KStartupInfoData;
00052 
00053 namespace KWin
00054 {
00055 
00056 class Workspace;
00057 class Client;
00058 class Bridge;
00059 
00060 class Client
00061     : public Toplevel
00062     {
00063     Q_OBJECT
00064     public:
00065         Client( Workspace *ws );
00066         Window wrapperId() const;
00067         Window decorationId() const;
00068 
00069         const Client* transientFor() const;
00070         Client* transientFor();
00071         bool isTransient() const;
00072         bool groupTransient() const;
00073         bool wasOriginallyGroupTransient() const;
00074         ClientList mainClients() const; // call once before loop , is not indirect
00075         ClientList allMainClients() const; // call once before loop , is indirect
00076         bool hasTransient( const Client* c, bool indirect ) const;
00077         const ClientList& transients() const; // is not indirect
00078         void checkTransient( Window w );
00079         Client* findModal( bool allow_itself = false );
00080         const Group* group() const;
00081         Group* group();
00082         void checkGroup( Group* gr = NULL, bool force = false );
00083         void changeClientLeaderGroup( Group* gr );
00084         const WindowRules* rules() const;
00085         void removeRule( Rules* r );
00086         void setupWindowRules( bool ignore_temporary );
00087         void applyWindowRules();
00088         void updateWindowRules();
00089 
00090     // returns true for "special" windows and false for windows which are "normal"
00091     // (normal=window which has a border, can be moved by the user, can be closed, etc.)
00092     // true for Desktop, Dock, Splash, Override and TopMenu (and Toolbar??? - for now)
00093     // false for Normal, Dialog, Utility and Menu (and Toolbar??? - not yet) TODO
00094         bool isSpecialWindow() const;
00095         bool hasNETSupport() const;
00096 
00097         QSize minSize() const;
00098         QSize maxSize() const;
00099         virtual QPoint clientPos() const; // inside of geometry()
00100         virtual QSize clientSize() const;
00101 
00102         bool windowEvent( XEvent* e );
00103         virtual bool eventFilter( QObject* o, QEvent* e );
00104 #ifdef HAVE_XSYNC
00105         void syncEvent( XSyncAlarmNotifyEvent* e );
00106 #endif
00107 
00108         bool manage( Window w, bool isMapped );
00109         void releaseWindow( bool on_shutdown = false );
00110         void destroyClient();
00111 
00112         enum Sizemode // how to resize the window in order to obey constains (mainly aspect ratios)
00113             {
00114             SizemodeAny,
00115             SizemodeFixedW, // try not to affect width
00116             SizemodeFixedH, // try not to affect height
00117             SizemodeMax // try not to make it larger in either direction
00118             };
00119         QSize adjustedSize( const QSize&, Sizemode mode = SizemodeAny ) const;
00120         QSize adjustedSize() const;
00121 
00122         QPixmap icon() const;
00123         QPixmap miniIcon() const;
00124 
00125         bool isActive() const;
00126         void setActive( bool );
00127 
00128         virtual int desktop() const;
00129         void setDesktop( int );
00130         void setOnAllDesktops( bool set );
00131         
00132     // !isMinimized() && not hidden, i.e. normally visible on some virtual desktop
00133         bool isShown( bool shaded_is_shown ) const;
00134         bool isHiddenInternal() const; // for compositing
00135 
00136         bool isShade() const; // true only for ShadeNormal
00137         ShadeMode shadeMode() const; // prefer isShade()
00138         void setShade( ShadeMode mode );
00139         bool isShadeable() const;
00140 
00141         bool isMinimized() const;
00142         bool isMaximizable() const;
00143         QRect geometryRestore() const;
00144         MaximizeMode maximizeModeRestore() const;
00145         MaximizeMode maximizeMode() const;
00146         bool isMinimizable() const;
00147         void setMaximize( bool vertically, bool horizontally );
00148         QRect iconGeometry() const;
00149 
00150         void setFullScreen( bool set, bool user );
00151         bool isFullScreen() const;
00152         bool isFullScreenable( bool fullscreen_hack = false ) const;
00153         bool userCanSetFullScreen() const;
00154         QRect geometryFSRestore() const { return geom_fs_restore; } // only for session saving
00155         int fullScreenMode() const { return fullscreen_mode; } // only for session saving
00156 
00157         bool noBorder() const;
00158         void setNoBorder( bool set );
00159         bool userCanSetNoBorder() const;
00160 
00161         bool skipTaskbar( bool from_outside = false ) const;
00162         void setSkipTaskbar( bool set, bool from_outside );
00163 
00164         bool skipPager() const;
00165         void setSkipPager( bool );
00166 
00167         bool keepAbove() const;
00168         void setKeepAbove( bool );
00169         bool keepBelow() const;
00170         void setKeepBelow( bool );
00171         Layer layer() const;
00172         Layer belongsToLayer() const;
00173         void invalidateLayer();
00174         int sessionStackingOrder() const;
00175 
00176         void setModal( bool modal );
00177         bool isModal() const;
00178 
00179     // auxiliary functions, depend on the windowType
00180         bool wantsTabFocus() const;
00181         bool wantsInput() const;
00182 
00183         bool isResizable() const;
00184         bool isMovable() const;
00185         bool isCloseable() const; // may be closed by the user (may have a close button)
00186 
00187         void takeActivity( int flags, bool handled, allowed_t ); // takes ActivityFlags as arg (in utils.h)
00188         void takeFocus( allowed_t );
00189         void demandAttention( bool set = true );
00190 
00191         void setMask( const QRegion& r, int mode = X::Unsorted );
00192         QRegion mask() const;
00193 
00194         void updateDecoration( bool check_workspace_pos, bool force = false );
00195         bool checkBorderSizes( bool also_resize );
00196         void repaintDecoration();
00197 
00198         void updateShape();
00199         
00200         void setGeometry( int x, int y, int w, int h, ForceGeometry_t force = NormalGeometrySet );
00201         void setGeometry( const QRect& r, ForceGeometry_t force = NormalGeometrySet );
00202         void move( int x, int y, ForceGeometry_t force = NormalGeometrySet );
00203         void move( const QPoint & p, ForceGeometry_t force = NormalGeometrySet );
00204         // plainResize() simply resizes
00205         void plainResize( int w, int h, ForceGeometry_t force = NormalGeometrySet );
00206         void plainResize( const QSize& s, ForceGeometry_t force = NormalGeometrySet );
00207         // resizeWithChecks() resizes according to gravity, and checks workarea position
00208         void resizeWithChecks( int w, int h, ForceGeometry_t force = NormalGeometrySet );
00209         void resizeWithChecks( const QSize& s, ForceGeometry_t force = NormalGeometrySet );
00210         void keepInArea( QRect area, bool partial = false );
00211 
00212         void growHorizontal();
00213         void shrinkHorizontal();
00214         void growVertical();
00215         void shrinkVertical();
00216 
00217         bool providesContextHelp() const;
00218         KShortcut shortcut() const;
00219         void setShortcut( const QString& cut );
00220 
00221         bool performMouseCommand( Options::MouseCommand, const QPoint &globalPos, bool handled = false );
00222 
00223         QRect adjustedClientArea( const QRect& desktop, const QRect& area ) const;
00224 
00225         Colormap colormap() const;
00226 
00227     // updates visibility depending on being shaded, virtual desktop, etc.
00228         void updateVisibility();
00229     // hides a client - basically like minimize, but without effects, it's simply hidden
00230         void hideClient( bool hide );
00231         bool hiddenPreview() const; // window is mapped in order to get a window pixmap
00232 
00233         QString caption( bool full = true ) const;
00234         void updateCaption();
00235 
00236         void keyPressEvent( uint key_code ); // FRAME ??
00237         void updateMouseGrab();
00238         Window moveResizeGrabWindow() const;
00239 
00240         const QPoint calculateGravitation( bool invert, int gravity = 0 ) const; // FRAME public?
00241 
00242         void NETMoveResize( int x_root, int y_root, NET::Direction direction );
00243         void NETMoveResizeWindow( int flags, int x, int y, int width, int height );
00244         void restackWindow( Window above, int detail, NET::RequestSource source, Time timestamp, bool send_event = false );
00245         
00246         void gotPing( Time timestamp );
00247 
00248         void checkWorkspacePosition();
00249         void updateUserTime( Time time = CurrentTime );
00250         Time userTime() const;
00251         bool hasUserTimeSupport() const;
00252         bool ignoreFocusStealing() const;
00253 
00254     // does 'delete c;'
00255         static void deleteClient( Client* c, allowed_t );
00256 
00257         static bool belongToSameApplication( const Client* c1, const Client* c2, bool active_hack = false );
00258         static bool sameAppWindowRoleMatch( const Client* c1, const Client* c2, bool active_hack );
00259         static void readIcons( Window win, QPixmap* icon, QPixmap* miniicon );
00260 
00261         void minimize( bool avoid_animation = false );
00262         void unminimize( bool avoid_animation = false );
00263         void closeWindow();
00264         void killWindow();
00265         void maximize( MaximizeMode );
00266         void toggleShade();
00267         void showContextHelp();
00268         void cancelShadeHover();
00269         void cancelAutoRaise();
00270         void checkActiveModal();
00271         bool hasStrut() const;
00272 
00273         bool isMove() const 
00274             {
00275             return moveResizeMode && mode == PositionCenter;
00276             }
00277         bool isResize() const 
00278             {
00279             return moveResizeMode && mode != PositionCenter;
00280             }
00281         
00282     private slots:
00283         void autoRaise();
00284         void shadeHover();
00285         void shortcutActivated();
00286         void delayedMoveResize();
00287 
00288     private:
00289         friend class Bridge; // FRAME
00290         virtual void processMousePressEvent( QMouseEvent* e );
00291 
00292     private: // TODO cleanup the order of things in the .h file
00293     // use Workspace::createClient()
00294         virtual ~Client(); // use destroyClient() or releaseWindow()
00295 
00296         Position mousePosition( const QPoint& ) const;
00297         void updateCursor();
00298 
00299     // transparent stuff
00300         void drawbound( const QRect& geom );
00301         void clearbound();
00302         void doDrawbound( const QRect& geom, bool clear );
00303 
00304     // handlers for X11 events
00305         bool mapRequestEvent( XMapRequestEvent* e );
00306         void unmapNotifyEvent( XUnmapEvent*e );
00307         void destroyNotifyEvent( XDestroyWindowEvent*e );
00308         void configureRequestEvent( XConfigureRequestEvent* e );
00309         virtual void propertyNotifyEvent( XPropertyEvent* e );
00310         void clientMessageEvent( XClientMessageEvent* e );
00311         void enterNotifyEvent( XCrossingEvent* e );
00312         void leaveNotifyEvent( XCrossingEvent* e );
00313         void focusInEvent( XFocusInEvent* e );
00314         void focusOutEvent( XFocusOutEvent* e );
00315 #ifdef HAVE_XDAMAGE
00316         virtual void damageNotifyEvent( XDamageNotifyEvent* e );
00317 #endif
00318 
00319         bool buttonPressEvent( Window w, int button, int state, int x, int y, int x_root, int y_root );
00320         bool buttonReleaseEvent( Window w, int button, int state, int x, int y, int x_root, int y_root );
00321         bool motionNotifyEvent( Window w, int state, int x, int y, int x_root, int y_root );
00322 
00323         void processDecorationButtonPress( int button, int state, int x, int y, int x_root, int y_root );
00324 
00325     protected:
00326         virtual void debug( kdbgstream& stream ) const;
00327 
00328     private slots:
00329         void pingTimeout();
00330         void processKillerExited();
00331         void demandAttentionKNotify();
00332         void syncTimeout();
00333 
00334     private:
00335         void setMappingState( int s ); // ICCCM 4.1.3.1, 4.1.4 , NETWM 2.5.1
00336         int mappingState() const;
00337         bool isIconicState() const;
00338         bool isNormalState() const;
00339         bool isManaged() const; // returns false if this client is not yet managed
00340         void updateAllowedActions( bool force = false );
00341         QSize sizeForClientSize( const QSize&, Sizemode mode = SizemodeAny, bool noframe = false ) const;
00342         void changeMaximize( bool horizontal, bool vertical, bool adjust );
00343         void checkMaximizeGeometry();
00344         int checkFullScreenHack( const QRect& geom ) const; // 0 - none, 1 - one xinerama screen, 2 - full area
00345         void updateFullScreenHack( const QRect& geom );
00346         void getWmNormalHints();
00347         void getMotifHints();
00348         void getIcons();
00349         void fetchName();
00350         void fetchIconicName();
00351         QString readName() const;
00352         void setCaption( const QString& s, bool force = false );
00353         bool hasTransientInternal( const Client* c, bool indirect, ConstClientList& set ) const;
00354         void finishWindowRules();
00355         void setShortcutInternal( const KShortcut& cut );
00356 
00357         void updateWorkareaDiffs();
00358         void checkDirection( int new_diff, int old_diff, QRect& rect, const QRect& area );
00359         static int computeWorkareaDiff( int left, int right, int a_left, int a_right );
00360         void configureRequest( int value_mask, int rx, int ry, int rw, int rh, int gravity, bool from_tool );
00361         NETExtendedStrut strut() const;
00362         int checkShadeGeometry( int w, int h );
00363         void blockGeometryUpdates( bool block );
00364         void getSyncCounter();
00365         void sendSyncRequest();
00366 
00367         bool startMoveResize();
00368         void finishMoveResize( bool cancel );
00369         void leaveMoveResize();
00370         void checkUnrestrictedMoveResize();
00371         void handleMoveResize( int x, int y, int x_root, int y_root );
00372         void startDelayedMoveResize();
00373         void stopDelayedMoveResize();
00374         void positionGeometryTip();
00375         void grabButton( int mod );
00376         void ungrabButton( int mod );
00377         void resetMaximize();
00378         void resizeDecoration( const QSize& s );
00379         void performMoveResize();
00380 
00381         void pingWindow();
00382         void killProcess( bool ask, Time timestamp = CurrentTime );
00383         void updateUrgency();
00384         static void sendClientMessage( Window w, Atom a, Atom protocol,
00385             long data1 = 0, long data2 = 0, long data3 = 0 );
00386 
00387         void embedClient( Window w, const XWindowAttributes &attr );    
00388         void detectNoBorder();
00389         void destroyDecoration();
00390         void updateFrameExtents();
00391 
00392         void rawShow(); // just shows it
00393         void rawHide(); // just hides it
00394         void setHiddenPreview( bool set, allowed_t );
00395         void updateInputShape();
00396 
00397         Time readUserTimeMapTimestamp( const KStartupInfoId* asn_id, const KStartupInfoData* asn_data,
00398             bool session ) const;
00399         Time readUserCreationTime() const;
00400         void startupIdChanged();
00401         
00402         Window client;
00403         Window wrapper;
00404         KDecoration* decoration;
00405         Bridge* bridge;
00406         int desk;
00407         bool buttonDown;
00408         bool moveResizeMode;
00409         bool move_faked_activity;
00410         Window move_resize_grab_window;
00411         bool move_resize_has_keyboard_grab;
00412         bool unrestrictedMoveResize;
00413 
00414         Position mode;
00415         QPoint moveOffset;
00416         QPoint invertedMoveOffset;
00417         QRect moveResizeGeom;
00418         QRect initialMoveResizeGeom;
00419         XSizeHints  xSizeHint;
00420         void sendSyntheticConfigureNotify();
00421         int mapping_state;
00422         void readTransient();
00423         Window verifyTransientFor( Window transient_for, bool set );
00424         void addTransient( Client* cl );
00425         void removeTransient( Client* cl );
00426         void removeFromMainClients();
00427         void cleanGrouping();
00428         void checkGroupTransients();
00429         void setTransient( Window new_transient_for_id );
00430         Client* transient_for;
00431         Window transient_for_id;
00432         Window original_transient_for_id;
00433         ClientList transients_list; // SELI make this ordered in stacking order?
00434         ShadeMode shade_mode;
00435         uint active :1;
00436         uint deleting : 1; // true when doing cleanup and destroying the client
00437         uint keep_above : 1; // NET::KeepAbove (was stays_on_top)
00438         uint skip_taskbar :1;
00439         uint original_skip_taskbar :1; // unaffected by KWin
00440         uint Pdeletewindow :1; // does the window understand the DeleteWindow protocol?
00441         uint Ptakefocus :1;// does the window understand the TakeFocus protocol?
00442         uint Ptakeactivity : 1; // does it support _NET_WM_TAKE_ACTIVITY
00443         uint Pcontexthelp : 1; // does the window understand the ContextHelp protocol?
00444         uint Pping : 1; // does it support _NET_WM_PING?
00445         uint input :1; // does the window want input in its wm_hints
00446         uint skip_pager : 1;
00447         uint motif_may_resize : 1;
00448         uint motif_may_move :1;
00449         uint motif_may_close : 1;
00450         uint keep_below : 1; // NET::KeepBelow
00451         uint minimized : 1;
00452         uint hidden : 1; // forcibly hidden by calling hide()
00453         uint modal : 1; // NET::Modal
00454         uint noborder : 1;
00455         uint app_noborder : 1; // the app requested no border using something (window type, motif hints)
00456         uint urgency : 1; // XWMHints, UrgencyHint
00457         uint ignore_focus_stealing : 1; // don't apply focus stealing prevention to this client
00458         uint demands_attention : 1;
00459         uint hidden_preview : 1; // mapped only to get a window pixmap for compositing
00460         uint raw_shown : 1; // for use in rawShow()/rawHide()
00461         WindowRules client_rules;
00462         void getWMHints();
00463         void readIcons();
00464         void getWindowProtocols();
00465         QPixmap icon_pix;
00466         QPixmap miniicon_pix;
00467         QCursor cursor;
00468     // FullScreenHack - non-NETWM fullscreen (noborder,size of desktop)
00469     // DON'T reorder - saved to config files !!!
00470         enum FullScreenMode { FullScreenNone, FullScreenNormal, FullScreenHack };
00471         FullScreenMode fullscreen_mode;
00472         MaximizeMode max_mode;
00473         QRect geom_restore;
00474         QRect geom_fs_restore;
00475         MaximizeMode maxmode_restore;
00476         int workarea_diff_x, workarea_diff_y;
00477         QTimer* autoRaiseTimer;
00478         QTimer* shadeHoverTimer;
00479         QTimer* delayedMoveResizeTimer;
00480         Colormap cmap;
00481         QString cap_normal, cap_iconic, cap_suffix;
00482         Group* in_group;
00483         Window window_group;
00484         Layer in_layer;
00485         QTimer* ping_timer;
00486         QProcess* process_killer;
00487         Time ping_timestamp;
00488         Time user_time;
00489         unsigned long allowed_actions;
00490         QSize client_size;
00491         int block_geometry_updates; // >0 - new geometry is remembered, but not actually set
00492         enum PendingGeometry_t { PendingGeometryNone, PendingGeometryNormal, PendingGeometryForced };
00493         PendingGeometry_t pending_geometry_update;
00494         QRect geom_before_block;
00495         bool shade_geometry_change;
00496 #ifdef HAVE_XSYNC
00497         XSyncCounter sync_counter;
00498         XSyncValue sync_counter_value;
00499         XSyncAlarm sync_alarm;
00500 #endif
00501         QTimer* sync_timeout;
00502         bool sync_resize_pending;
00503         int border_left, border_right, border_top, border_bottom;
00504         QRegion _mask;
00505         static bool check_active_modal; // see Client::checkActiveModal()
00506         KShortcut _shortcut;
00507         int sm_stacking_order;
00508         friend struct FetchNameInternalPredicate;
00509         friend struct CheckIgnoreFocusStealingProcedure;
00510         friend struct ResetupRulesProcedure;
00511         friend class GeometryUpdatesBlocker;
00512         QTimer* demandAttentionKNotifyTimer;
00513 
00514         friend bool performTransiencyCheck();
00515     };
00516 
00517 // helper for Client::blockGeometryUpdates() being called in pairs (true/false)
00518 class GeometryUpdatesBlocker
00519     {
00520     public:
00521         GeometryUpdatesBlocker( Client* c )
00522             : cl( c ) { cl->blockGeometryUpdates( true ); }
00523         ~GeometryUpdatesBlocker()
00524             { cl->blockGeometryUpdates( false ); }
00525     private:
00526         Client* cl;
00527     };
00528 
00529 
00530 // NET WM Protocol handler class
00531 class WinInfo : public NETWinInfo
00532     {
00533     private:
00534         typedef KWin::Client Client; // because of NET::Client
00535     public:
00536         WinInfo( Client* c, Display * display, Window window,
00537                 Window rwin, const unsigned long pr[], int pr_size );
00538         virtual void changeDesktop(int desktop);
00539         virtual void changeState( unsigned long state, unsigned long mask );
00540         void disable();
00541     private:
00542         Client * m_client;
00543     };
00544 
00545 inline Window Client::wrapperId() const
00546     {
00547     return wrapper;
00548     }
00549 
00550 inline Window Client::decorationId() const
00551     {
00552     return decoration != NULL ? decoration->widget()->winId() : None;
00553     }
00554 
00555 inline const Client* Client::transientFor() const
00556     {
00557     return transient_for;
00558     }
00559 
00560 inline Client* Client::transientFor()
00561     {
00562     return transient_for;
00563     }
00564 
00565 inline bool Client::groupTransient() const
00566     {
00567     return transient_for_id == rootWindow();
00568     }
00569 
00570 // needed because verifyTransientFor() may set transient_for_id to root window,
00571 // if the original value has a problem (window doesn't exist, etc.)
00572 inline bool Client::wasOriginallyGroupTransient() const
00573     {
00574     return original_transient_for_id == rootWindow();
00575     }
00576 
00577 inline bool Client::isTransient() const
00578     {
00579     return transient_for_id != None;
00580     }
00581 
00582 inline const ClientList& Client::transients() const
00583     {
00584     return transients_list;
00585     }
00586 
00587 inline const Group* Client::group() const
00588     {
00589     return in_group;
00590     }
00591 
00592 inline Group* Client::group()
00593     {
00594     return in_group;
00595     }
00596 
00597 inline int Client::mappingState() const
00598     {
00599     return mapping_state;
00600     }
00601 
00602 inline
00603 bool Client::isMinimized() const
00604     {
00605     return minimized;
00606     }
00607 
00608 inline bool Client::isActive() const
00609     {
00610     return active;
00611     }
00612 
00613 inline
00614 bool Client::isShown( bool shaded_is_shown ) const
00615     {
00616     return !isMinimized() && ( !isShade() || shaded_is_shown ) && !hidden;
00617     }
00618 
00619 inline
00620 bool Client::isHiddenInternal() const
00621     {
00622     return hidden;
00623     }
00624 
00625 inline
00626 bool Client::isShade() const
00627     {
00628     return shade_mode == ShadeNormal;
00629     }
00630 
00631 inline
00632 ShadeMode Client::shadeMode() const
00633     {
00634     return shade_mode;
00635     }
00636 
00637 inline QPixmap Client::icon() const
00638     {
00639     return icon_pix;
00640     }
00641 
00642 inline QPixmap Client::miniIcon() const
00643     {
00644     return miniicon_pix;
00645     }
00646 
00647 inline QRect Client::geometryRestore() const
00648     {
00649     return geom_restore;
00650     }
00651 
00652 inline Client::MaximizeMode Client::maximizeModeRestore() const
00653     {
00654     return maxmode_restore;
00655     }
00656 
00657 inline Client::MaximizeMode Client::maximizeMode() const
00658     {
00659     return max_mode;
00660     }
00661 
00662 inline bool Client::skipTaskbar( bool from_outside ) const
00663     {
00664     return from_outside ? original_skip_taskbar : skip_taskbar;
00665     }
00666 
00667 inline bool Client::skipPager() const
00668     {
00669     return skip_pager;
00670     }
00671 
00672 inline bool Client::keepAbove() const
00673     {
00674     return keep_above;
00675     }
00676 
00677 inline bool Client::keepBelow() const
00678     {
00679     return keep_below;
00680     }
00681 
00682 inline bool Client::isFullScreen() const
00683     {
00684     return fullscreen_mode != FullScreenNone;
00685     }
00686 
00687 inline bool Client::isModal() const
00688     {
00689     return modal;
00690     }
00691 
00692 inline bool Client::hasNETSupport() const
00693     {
00694     return info->hasNETSupport();
00695     }
00696 
00697 inline Colormap Client::colormap() const
00698     {
00699     return cmap;
00700     }
00701 
00702 inline void Client::invalidateLayer()
00703     {
00704     in_layer = UnknownLayer;
00705     }
00706 
00707 inline int Client::sessionStackingOrder() const
00708     {
00709     return sm_stacking_order;
00710     }
00711 
00712 inline bool Client::isIconicState() const
00713     {
00714     return mapping_state == IconicState;
00715     }
00716 
00717 inline bool Client::isNormalState() const
00718     {
00719     return mapping_state == NormalState;
00720     }
00721 
00722 inline bool Client::isManaged() const
00723     {
00724     return mapping_state != WithdrawnState;
00725     }
00726 
00727 inline QPoint Client::clientPos() const
00728     {
00729     return QPoint( border_left, border_top );
00730     }
00731 
00732 inline QSize Client::clientSize() const
00733     {
00734     return client_size;
00735     }
00736 
00737 inline void Client::setGeometry( const QRect& r, ForceGeometry_t force )
00738     {
00739     setGeometry( r.x(), r.y(), r.width(), r.height(), force );
00740     }
00741 
00742 inline void Client::move( const QPoint & p, ForceGeometry_t force )
00743     {
00744     move( p.x(), p.y(), force );
00745     }
00746 
00747 inline void Client::plainResize( const QSize& s, ForceGeometry_t force )
00748     {
00749     plainResize( s.width(), s.height(), force );
00750     }
00751 
00752 inline void Client::resizeWithChecks( const QSize& s, ForceGeometry_t force )
00753     {
00754     resizeWithChecks( s.width(), s.height(), force );
00755     }
00756 
00757 inline bool Client::hasUserTimeSupport() const
00758     {
00759     return info->userTime() != -1U;
00760     }
00761     
00762 inline bool Client::ignoreFocusStealing() const
00763     {
00764     return ignore_focus_stealing;
00765     }
00766 
00767 inline const WindowRules* Client::rules() const
00768     {
00769     return &client_rules;
00770     }
00771 
00772 KWIN_PROCEDURE( CheckIgnoreFocusStealingProcedure, Client, cl->ignore_focus_stealing = options->checkIgnoreFocusStealing( cl ));
00773 
00774 inline Window Client::moveResizeGrabWindow() const
00775     {
00776     return move_resize_grab_window;
00777     }
00778 
00779 inline KShortcut Client::shortcut() const
00780     {
00781     return _shortcut;
00782     }
00783 
00784 inline void Client::removeRule( Rules* rule )
00785     {
00786     client_rules.remove( rule );
00787     }
00788 
00789 inline bool Client::hiddenPreview() const
00790     {
00791     return hidden_preview;
00792     }
00793 
00794 KWIN_COMPARE_PREDICATE( WrapperIdMatchPredicate, Client, Window, cl->wrapperId() == value );
00795 
00796 } // namespace
00797 
00798 #endif

KWin

Skip menu "KWin"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal