• Skip to content
  • Skip to link menu
KDE 4.2 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 // TODO: Cleanup the order of things in this .h file
00050 
00051 class QProcess;
00052 class QTimer;
00053 class KStartupInfoData;
00054 
00055 namespace KWin
00056 {
00057 
00058 class Workspace;
00059 class Client;
00060 class Bridge;
00061 
00062 class Client
00063     : public Toplevel
00064     {
00065     Q_OBJECT
00066     public:
00067         Client( Workspace* ws );
00068         Window wrapperId() const;
00069         Window decorationId() const;
00070 
00071         const Client* transientFor() const;
00072         Client* transientFor();
00073         bool isTransient() const;
00074         bool groupTransient() const;
00075         bool wasOriginallyGroupTransient() const;
00076         ClientList mainClients() const; // Call once before loop , is not indirect
00077         ClientList allMainClients() const; // Call once before loop , is indirect
00078         bool hasTransient( const Client* c, bool indirect ) const;
00079         const ClientList& transients() const; // Is not indirect
00080         void checkTransient( Window w );
00081         Client* findModal( bool allow_itself = false );
00082         const Group* group() const;
00083         Group* group();
00084         void checkGroup( Group* gr = NULL, bool force = false );
00085         void changeClientLeaderGroup( Group* gr );
00086         const WindowRules* rules() const;
00087         void removeRule( Rules* r );
00088         void setupWindowRules( bool ignore_temporary );
00089         void applyWindowRules();
00090         void updateWindowRules();
00091         void updateFullscreenMonitors( NETFullscreenMonitors topology );
00092 
00099         bool isSpecialWindow() const;
00100         bool hasNETSupport() const;
00101 
00102         QSize minSize() const;
00103         QSize maxSize() const;
00104         virtual QPoint clientPos() const; // Inside of geometry()
00105         virtual QSize clientSize() const;
00106 
00107         bool windowEvent( XEvent* e );
00108         virtual bool eventFilter( QObject* o, QEvent* e );
00109 #ifdef HAVE_XSYNC
00110         void syncEvent( XSyncAlarmNotifyEvent* e );
00111 #endif
00112 
00113         bool manage( Window w, bool isMapped );
00114         void releaseWindow( bool on_shutdown = false );
00115         void destroyClient();
00116 
00118         enum Sizemode
00119             {
00120             SizemodeAny,
00121             SizemodeFixedW, 
00122             SizemodeFixedH, 
00123             SizemodeMax 
00124             };
00125         QSize adjustedSize( const QSize&, Sizemode mode = SizemodeAny ) const;
00126         QSize adjustedSize() const;
00127 
00128         QPixmap icon() const;
00129         QPixmap miniIcon() const;
00130 
00131         bool isActive() const;
00132         void setActive( bool );
00133 
00134         virtual int desktop() const;
00135         void setDesktop( int );
00136         void setOnAllDesktops( bool set );
00137 
00139         bool isShown( bool shaded_is_shown ) const;
00140         bool isHiddenInternal() const; // For compositing
00141 
00142         bool isShade() const; // True only for ShadeNormal
00143         ShadeMode shadeMode() const; // Prefer isShade()
00144         void setShade( ShadeMode mode );
00145         bool isShadeable() const;
00146 
00147         bool isMinimized() const;
00148         bool isMaximizable() const;
00149         QRect geometryRestore() const;
00150         MaximizeMode maximizeModeRestore() const;
00151         MaximizeMode maximizeMode() const;
00152         bool isMinimizable() const;
00153         void setMaximize( bool vertically, bool horizontally );
00154         QRect iconGeometry() const;
00155 
00156         void setFullScreen( bool set, bool user );
00157         bool isFullScreen() const;
00158         bool isFullScreenable( bool fullscreen_hack = false ) const;
00159         bool isActiveFullScreen() const;
00160         bool userCanSetFullScreen() const;
00161         QRect geometryFSRestore() const { return geom_fs_restore; } // Only for session saving
00162         int fullScreenMode() const { return fullscreen_mode; } // only for session saving
00163 
00164         bool noBorder() const;
00165         void setNoBorder( bool set );
00166         bool userCanSetNoBorder() const;
00167 
00168         bool skipTaskbar( bool from_outside = false ) const;
00169         void setSkipTaskbar( bool set, bool from_outside );
00170 
00171         bool skipPager() const;
00172         void setSkipPager( bool );
00173 
00174         bool keepAbove() const;
00175         void setKeepAbove( bool );
00176         bool keepBelow() const;
00177         void setKeepBelow( bool );
00178         Layer layer() const;
00179         Layer belongsToLayer() const;
00180         void invalidateLayer();
00181         int sessionStackingOrder() const;
00182 
00183         void setModal( bool modal );
00184         bool isModal() const;
00185 
00186         // Auxiliary functions, depend on the windowType
00187         bool wantsTabFocus() const;
00188         bool wantsInput() const;
00189 
00190         bool isResizable() const;
00191         bool isMovable() const;
00192         bool isMovableAcrossScreens() const;
00193         bool isCloseable() const; 
00194 
00195         void takeActivity( int flags, bool handled, allowed_t ); // Takes ActivityFlags as arg (in utils.h)
00196         void takeFocus( allowed_t );
00197         void demandAttention( bool set = true );
00198 
00199         void setMask( const QRegion& r, int mode = X::Unsorted );
00200         QRegion mask() const;
00201 
00202         void updateDecoration( bool check_workspace_pos, bool force = false );
00203         bool checkBorderSizes( bool also_resize );
00204         void repaintDecoration();
00205 
00206         void updateShape();
00207 
00208         void setGeometry( int x, int y, int w, int h, ForceGeometry_t force = NormalGeometrySet );
00209         void setGeometry( const QRect& r, ForceGeometry_t force = NormalGeometrySet );
00210         void move( int x, int y, ForceGeometry_t force = NormalGeometrySet );
00211         void move( const QPoint& p, ForceGeometry_t force = NormalGeometrySet );
00213         void plainResize( int w, int h, ForceGeometry_t force = NormalGeometrySet );
00214         void plainResize( const QSize& s, ForceGeometry_t force = NormalGeometrySet );
00216         void resizeWithChecks( int w, int h, ForceGeometry_t force = NormalGeometrySet );
00217         void resizeWithChecks( const QSize& s, ForceGeometry_t force = NormalGeometrySet );
00218         void keepInArea( QRect area, bool partial = false );
00219 
00220         void growHorizontal();
00221         void shrinkHorizontal();
00222         void growVertical();
00223         void shrinkVertical();
00224 
00225         bool providesContextHelp() const;
00226         KShortcut shortcut() const;
00227         void setShortcut( const QString& cut );
00228 
00229         bool performMouseCommand( Options::MouseCommand, const QPoint& globalPos, bool handled = false );
00230 
00231         QRect adjustedClientArea( const QRect& desktop, const QRect& area ) const;
00232 
00233         Colormap colormap() const;
00234 
00236         void updateVisibility();
00238         void hideClient( bool hide );
00239         bool hiddenPreview() const; 
00240 
00241         virtual void setupCompositing();
00242         virtual void finishCompositing();
00243 
00244         QString caption( bool full = true ) const;
00245         void updateCaption();
00246 
00247         void keyPressEvent( uint key_code ); // FRAME ??
00248         void updateMouseGrab();
00249         Window moveResizeGrabWindow() const;
00250 
00251         const QPoint calculateGravitation( bool invert, int gravity = 0 ) const; // FRAME public?
00252 
00253         void NETMoveResize( int x_root, int y_root, NET::Direction direction );
00254         void NETMoveResizeWindow( int flags, int x, int y, int width, int height );
00255         void restackWindow( Window above, int detail, NET::RequestSource source, Time timestamp,
00256             bool send_event = false );
00257 
00258         void gotPing( Time timestamp );
00259 
00260         void checkWorkspacePosition();
00261         void updateUserTime( Time time = CurrentTime );
00262         Time userTime() const;
00263         bool hasUserTimeSupport() const;
00264         bool ignoreFocusStealing() const;
00265 
00267         static void deleteClient( Client* c, allowed_t );
00268 
00269         static bool belongToSameApplication( const Client* c1, const Client* c2, bool active_hack = false );
00270         static bool sameAppWindowRoleMatch( const Client* c1, const Client* c2, bool active_hack );
00271         static void readIcons( Window win, QPixmap* icon, QPixmap* miniicon );
00272 
00273         void minimize( bool avoid_animation = false );
00274         void unminimize( bool avoid_animation = false );
00275         void closeWindow();
00276         void killWindow();
00277         void maximize( MaximizeMode );
00278         void toggleShade();
00279         void showContextHelp();
00280         void cancelShadeHoverTimer();
00281         void cancelAutoRaise();
00282         void checkActiveModal();
00283         bool hasStrut() const;
00284 
00285         bool isMove() const 
00286             {
00287             return moveResizeMode && mode == PositionCenter;
00288             }
00289         bool isResize() const 
00290             {
00291             return moveResizeMode && mode != PositionCenter;
00292             }
00293 
00294         // Decorations <-> Effects
00295         QList<QRect> shadowQuads( ShadowType type ) const;
00296         double shadowOpacity( ShadowType type ) const;
00297         double shadowBrightness( ShadowType type ) const;
00298         double shadowSaturation( ShadowType type ) const;
00299 
00300     private slots:
00301         void autoRaise();
00302         void shadeHover();
00303         void shadeUnhover();
00304         void shortcutActivated();
00305         void delayedMoveResize();
00306 
00307     private:
00308         friend class Bridge; // FRAME
00309         virtual void processMousePressEvent( QMouseEvent* e );
00310 
00311     private:
00312         // Use Workspace::createClient()
00313         virtual ~Client(); 
00314 
00315         Position mousePosition( const QPoint& ) const;
00316         void updateCursor();
00317 
00318         // Transparent stuff
00319         void drawbound( const QRect& geom );
00320         void clearbound();
00321         void doDrawbound( const QRect& geom, bool clear );
00322 
00323         // Handlers for X11 events
00324         bool mapRequestEvent( XMapRequestEvent* e );
00325         void unmapNotifyEvent( XUnmapEvent* e );
00326         void destroyNotifyEvent( XDestroyWindowEvent* e );
00327         void configureRequestEvent( XConfigureRequestEvent* e );
00328         virtual void propertyNotifyEvent( XPropertyEvent* e );
00329         void clientMessageEvent( XClientMessageEvent* e );
00330         void enterNotifyEvent( XCrossingEvent* e );
00331         void leaveNotifyEvent( XCrossingEvent* e );
00332         void focusInEvent( XFocusInEvent* e );
00333         void focusOutEvent( XFocusOutEvent* e );
00334 #ifdef HAVE_XDAMAGE
00335         virtual void damageNotifyEvent( XDamageNotifyEvent* e );
00336 #endif
00337 
00338         bool buttonPressEvent( Window w, int button, int state, int x, int y, int x_root, int y_root );
00339         bool buttonReleaseEvent( Window w, int button, int state, int x, int y, int x_root, int y_root );
00340         bool motionNotifyEvent( Window w, int state, int x, int y, int x_root, int y_root );
00341 
00342         void processDecorationButtonPress( int button, int state, int x, int y, int x_root, int y_root );
00343 
00344     protected:
00345         virtual void debug( kdbgstream& stream ) const;
00346         virtual bool shouldUnredirect() const;
00347 
00348     private slots:
00349         void pingTimeout();
00350         void processKillerExited();
00351         void demandAttentionKNotify();
00352         void syncTimeout();
00353         void delayedSetShortcut();
00354 
00355     private:
00356         void exportMappingState( int s ); // ICCCM 4.1.3.1, 4.1.4, NETWM 2.5.1
00357         bool isManaged() const; 
00358         void updateAllowedActions( bool force = false );
00359         QSize sizeForClientSize( const QSize&, Sizemode mode = SizemodeAny, bool noframe = false ) const;
00360         QRect fullscreenMonitorsArea( NETFullscreenMonitors topology ) const;
00361         void changeMaximize( bool horizontal, bool vertical, bool adjust );
00362         void checkMaximizeGeometry();
00363         int checkFullScreenHack( const QRect& geom ) const; // 0 - None, 1 - One xinerama screen, 2 - Full area
00364         void updateFullScreenHack( const QRect& geom );
00365         void getWmNormalHints();
00366         void getMotifHints();
00367         void getIcons();
00368         void fetchName();
00369         void fetchIconicName();
00370         QString readName() const;
00371         void setCaption( const QString& s, bool force = false );
00372         bool hasTransientInternal( const Client* c, bool indirect, ConstClientList& set ) const;
00373         void finishWindowRules();
00374         void setShortcutInternal( const KShortcut& cut );
00375 
00376         void updateWorkareaDiffs();
00377         void checkDirection( int new_diff, int old_diff, QRect& rect, const QRect& area );
00378         static int computeWorkareaDiff( int left, int right, int a_left, int a_right );
00379         void configureRequest( int value_mask, int rx, int ry, int rw, int rh, int gravity, bool from_tool );
00380         NETExtendedStrut strut() const;
00381         int checkShadeGeometry( int w, int h );
00382         void blockGeometryUpdates( bool block );
00383         void getSyncCounter();
00384         void sendSyncRequest();
00385 
00386         bool startMoveResize();
00387         void finishMoveResize( bool cancel );
00388         void leaveMoveResize();
00389         void checkUnrestrictedMoveResize();
00390         void handleMoveResize( int x, int y, int x_root, int y_root );
00391         void startDelayedMoveResize();
00392         void stopDelayedMoveResize();
00393         void positionGeometryTip();
00394         void grabButton( int mod );
00395         void ungrabButton( int mod );
00396         void resetMaximize();
00397         void resizeDecoration( const QSize& s );
00398         void performMoveResize();
00399 
00400         void pingWindow();
00401         void killProcess( bool ask, Time timestamp = CurrentTime );
00402         void updateUrgency();
00403         static void sendClientMessage( Window w, Atom a, Atom protocol,
00404             long data1 = 0, long data2 = 0, long data3 = 0 );
00405 
00406         void embedClient( Window w, const XWindowAttributes& attr );
00407         void detectNoBorder();
00408         void destroyDecoration();
00409         void updateFrameExtents();
00410 
00411         void internalShow( allowed_t );
00412         void internalHide( allowed_t );
00413         void internalKeep( allowed_t );
00414         void map( allowed_t );
00415         void unmap( allowed_t );
00416         void updateHiddenPreview();
00417 
00418         void updateInputShape();
00419 
00420         Time readUserTimeMapTimestamp( const KStartupInfoId* asn_id, const KStartupInfoData* asn_data,
00421             bool session ) const;
00422         Time readUserCreationTime() const;
00423         void startupIdChanged();
00424 
00425         Window client;
00426         Window wrapper;
00427         KDecoration* decoration;
00428         Bridge* bridge;
00429         int desk;
00430         bool buttonDown;
00431         bool moveResizeMode;
00432         bool move_faked_activity;
00433         Window move_resize_grab_window;
00434         bool move_resize_has_keyboard_grab;
00435         bool unrestrictedMoveResize;
00436 
00437         Position mode;
00438         QPoint moveOffset;
00439         QPoint invertedMoveOffset;
00440         QRect moveResizeGeom;
00441         QRect initialMoveResizeGeom;
00442         XSizeHints xSizeHint;
00443         void sendSyntheticConfigureNotify();
00444         enum MappingState
00445             {
00446             Withdrawn, 
00447             Mapped, 
00448             Unmapped, 
00449             Kept 
00450             };
00451         MappingState mapping_state;
00452         void readTransient();
00453         Window verifyTransientFor( Window transient_for, bool set );
00454         void addTransient( Client* cl );
00455         void removeTransient( Client* cl );
00456         void removeFromMainClients();
00457         void cleanGrouping();
00458         void checkGroupTransients();
00459         void setTransient( Window new_transient_for_id );
00460         Client* transient_for;
00461         Window transient_for_id;
00462         Window original_transient_for_id;
00463         ClientList transients_list; // SELI TODO: Make this ordered in stacking order?
00464         ShadeMode shade_mode;
00465         uint active : 1;
00466         uint deleting : 1; 
00467         uint keep_above : 1; 
00468         uint skip_taskbar : 1;
00469         uint original_skip_taskbar : 1; 
00470         uint Pdeletewindow : 1; 
00471         uint Ptakefocus : 1;
00472         uint Ptakeactivity : 1; 
00473         uint Pcontexthelp : 1; 
00474         uint Pping : 1; 
00475         uint input : 1; 
00476         uint skip_pager : 1;
00477         uint motif_may_resize : 1;
00478         uint motif_may_move : 1;
00479         uint motif_may_close : 1;
00480         uint keep_below : 1; 
00481         uint minimized : 1;
00482         uint hidden : 1; 
00483         uint modal : 1; 
00484         uint noborder : 1;
00485         uint app_noborder : 1; 
00486         uint urgency : 1; 
00487         uint ignore_focus_stealing : 1; 
00488         uint demands_attention : 1;
00489         WindowRules client_rules;
00490         void getWMHints();
00491         void readIcons();
00492         void getWindowProtocols();
00493         QPixmap icon_pix;
00494         QPixmap miniicon_pix;
00495         QCursor cursor;
00496         // DON'T reorder - Saved to config files !!!
00497         enum FullScreenMode
00498             {
00499             FullScreenNone,
00500             FullScreenNormal,
00501             FullScreenHack 
00502             };
00503         FullScreenMode fullscreen_mode;
00504         MaximizeMode max_mode;
00505         QRect geom_restore;
00506         QRect geom_fs_restore;
00507         MaximizeMode maxmode_restore;
00508         int workarea_diff_x, workarea_diff_y;
00509         QTimer* autoRaiseTimer;
00510         QTimer* shadeHoverTimer;
00511         QTimer* delayedMoveResizeTimer;
00512         Colormap cmap;
00513         QString cap_normal, cap_iconic, cap_suffix;
00514         Group* in_group;
00515         Window window_group;
00516         Layer in_layer;
00517         QTimer* ping_timer;
00518         QProcess* process_killer;
00519         Time ping_timestamp;
00520         Time user_time;
00521         unsigned long allowed_actions;
00522         QSize client_size;
00523         int block_geometry_updates; // > 0 = New geometry is remembered, but not actually set
00524         enum PendingGeometry_t
00525             {
00526             PendingGeometryNone,
00527             PendingGeometryNormal,
00528             PendingGeometryForced
00529             };
00530         PendingGeometry_t pending_geometry_update;
00531         QRect geom_before_block;
00532         bool shade_geometry_change;
00533 #ifdef HAVE_XSYNC
00534         XSyncCounter sync_counter;
00535         XSyncValue sync_counter_value;
00536         XSyncAlarm sync_alarm;
00537 #endif
00538         QTimer* sync_timeout;
00539         bool sync_resize_pending;
00540         int border_left, border_right, border_top, border_bottom;
00541         QRegion _mask;
00542         static bool check_active_modal; 
00543         KShortcut _shortcut;
00544         int sm_stacking_order;
00545         friend struct FetchNameInternalPredicate;
00546         friend struct CheckIgnoreFocusStealingProcedure;
00547         friend struct ResetupRulesProcedure;
00548         friend class GeometryUpdatesBlocker;
00549         QTimer* demandAttentionKNotifyTimer;
00550 
00551         friend bool performTransiencyCheck();
00552     };
00553 
00557 class GeometryUpdatesBlocker
00558     {
00559     public:
00560         GeometryUpdatesBlocker( Client* c )
00561             : cl( c ) { cl->blockGeometryUpdates( true ); }
00562         ~GeometryUpdatesBlocker()
00563             { cl->blockGeometryUpdates( false ); }
00564 
00565     private:
00566         Client* cl;
00567     };
00568 
00572 class WinInfo : public NETWinInfo2
00573     {
00574     private:
00575         typedef KWin::Client Client; // Because of NET::Client
00576 
00577     public:
00578         WinInfo( Client* c, Display * display, Window window,
00579             Window rwin, const unsigned long pr[], int pr_size );
00580         virtual void changeDesktop(int desktop);
00581         virtual void changeFullscreenMonitors(NETFullscreenMonitors topology);
00582         virtual void changeState( unsigned long state, unsigned long mask );
00583         void disable();
00584 
00585     private:
00586         Client * m_client;
00587     };
00588 
00589 inline Window Client::wrapperId() const
00590     {
00591     return wrapper;
00592     }
00593 
00594 inline Window Client::decorationId() const
00595     {
00596     return decoration != NULL ? decoration->widget()->winId() : None;
00597     }
00598 
00599 inline const Client* Client::transientFor() const
00600     {
00601     return transient_for;
00602     }
00603 
00604 inline Client* Client::transientFor()
00605     {
00606     return transient_for;
00607     }
00608 
00609 inline bool Client::groupTransient() const
00610     {
00611     return transient_for_id == rootWindow();
00612     }
00613 
00614 // Needed because verifyTransientFor() may set transient_for_id to root window,
00615 // if the original value has a problem (window doesn't exist, etc.)
00616 inline bool Client::wasOriginallyGroupTransient() const
00617     {
00618     return original_transient_for_id == rootWindow();
00619     }
00620 
00621 inline bool Client::isTransient() const
00622     {
00623     return transient_for_id != None;
00624     }
00625 
00626 inline const ClientList& Client::transients() const
00627     {
00628     return transients_list;
00629     }
00630 
00631 inline const Group* Client::group() const
00632     {
00633     return in_group;
00634     }
00635 
00636 inline Group* Client::group()
00637     {
00638     return in_group;
00639     }
00640 
00641 inline bool Client::isMinimized() const
00642     {
00643     return minimized;
00644     }
00645 
00646 inline bool Client::isActive() const
00647     {
00648     return active;
00649     }
00650 
00651 inline bool Client::isShown( bool shaded_is_shown ) const
00652     {
00653     return !isMinimized() && ( !isShade() || shaded_is_shown ) && !hidden;
00654     }
00655 
00656 inline bool Client::isHiddenInternal() const
00657     {
00658     return hidden;
00659     }
00660 
00661 inline bool Client::isShade() const
00662     {
00663     return shade_mode == ShadeNormal;
00664     }
00665 
00666 inline ShadeMode Client::shadeMode() const
00667     {
00668     return shade_mode;
00669     }
00670 
00671 inline QPixmap Client::icon() const
00672     {
00673     return icon_pix;
00674     }
00675 
00676 inline QPixmap Client::miniIcon() const
00677     {
00678     return miniicon_pix;
00679     }
00680 
00681 inline QRect Client::geometryRestore() const
00682     {
00683     return geom_restore;
00684     }
00685 
00686 inline Client::MaximizeMode Client::maximizeModeRestore() const
00687     {
00688     return maxmode_restore;
00689     }
00690 
00691 inline Client::MaximizeMode Client::maximizeMode() const
00692     {
00693     return max_mode;
00694     }
00695 
00696 inline bool Client::skipTaskbar( bool from_outside ) const
00697     {
00698     return from_outside ? original_skip_taskbar : skip_taskbar;
00699     }
00700 
00701 inline bool Client::skipPager() const
00702     {
00703     return skip_pager;
00704     }
00705 
00706 inline bool Client::keepAbove() const
00707     {
00708     return keep_above;
00709     }
00710 
00711 inline bool Client::keepBelow() const
00712     {
00713     return keep_below;
00714     }
00715 
00716 inline bool Client::isFullScreen() const
00717     {
00718     return fullscreen_mode != FullScreenNone;
00719     }
00720 
00721 inline bool Client::isModal() const
00722     {
00723     return modal;
00724     }
00725 
00726 inline bool Client::hasNETSupport() const
00727     {
00728     return info->hasNETSupport();
00729     }
00730 
00731 inline Colormap Client::colormap() const
00732     {
00733     return cmap;
00734     }
00735 
00736 inline void Client::invalidateLayer()
00737     {
00738     in_layer = UnknownLayer;
00739     }
00740 
00741 inline int Client::sessionStackingOrder() const
00742     {
00743     return sm_stacking_order;
00744     }
00745 
00746 inline bool Client::isManaged() const
00747     {
00748     return mapping_state != Withdrawn;
00749     }
00750 
00751 inline QPoint Client::clientPos() const
00752     {
00753     return QPoint( border_left, border_top );
00754     }
00755 
00756 inline QSize Client::clientSize() const
00757     {
00758     return client_size;
00759     }
00760 
00761 inline void Client::setGeometry( const QRect& r, ForceGeometry_t force )
00762     {
00763     setGeometry( r.x(), r.y(), r.width(), r.height(), force );
00764     }
00765 
00766 inline void Client::move( const QPoint& p, ForceGeometry_t force )
00767     {
00768     move( p.x(), p.y(), force );
00769     }
00770 
00771 inline void Client::plainResize( const QSize& s, ForceGeometry_t force )
00772     {
00773     plainResize( s.width(), s.height(), force );
00774     }
00775 
00776 inline void Client::resizeWithChecks( const QSize& s, ForceGeometry_t force )
00777     {
00778     resizeWithChecks( s.width(), s.height(), force );
00779     }
00780 
00781 inline bool Client::hasUserTimeSupport() const
00782     {
00783     return info->userTime() != -1U;
00784     }
00785 
00786 inline bool Client::ignoreFocusStealing() const
00787     {
00788     return ignore_focus_stealing;
00789     }
00790 
00791 inline const WindowRules* Client::rules() const
00792     {
00793     return &client_rules;
00794     }
00795 
00796 KWIN_PROCEDURE( CheckIgnoreFocusStealingProcedure, Client, cl->ignore_focus_stealing = options->checkIgnoreFocusStealing( cl ));
00797 
00798 inline Window Client::moveResizeGrabWindow() const
00799     {
00800     return move_resize_grab_window;
00801     }
00802 
00803 inline KShortcut Client::shortcut() const
00804     {
00805     return _shortcut;
00806     }
00807 
00808 inline void Client::removeRule( Rules* rule )
00809     {
00810     client_rules.remove( rule );
00811     }
00812 
00813 inline bool Client::hiddenPreview() const
00814     {
00815     return mapping_state == Kept;
00816     }
00817 
00818 inline QList<QRect> Client::shadowQuads( ShadowType type ) const
00819     {
00820     if( KDecorationUnstable* decoration2 = dynamic_cast< KDecorationUnstable* >( decoration ))
00821         return decoration2->shadowQuads( type );
00822     return QList<QRect>();
00823     }
00824 
00825 inline double Client::shadowOpacity( ShadowType type ) const
00826     {
00827     if( KDecorationUnstable* decoration2 = dynamic_cast< KDecorationUnstable* >( decoration ))
00828         return decoration2->shadowOpacity( type );
00829     return 1.0;
00830     }
00831 
00832 inline double Client::shadowBrightness( ShadowType type ) const
00833     {
00834     if( KDecorationUnstable* decoration2 = dynamic_cast< KDecorationUnstable* >( decoration ))
00835         return decoration2->shadowBrightness( type );
00836     return 1.0;
00837     }
00838 
00839 inline double Client::shadowSaturation( ShadowType type ) const
00840     {
00841     if( KDecorationUnstable* decoration2 = dynamic_cast< KDecorationUnstable* >( decoration ))
00842         return decoration2->shadowSaturation( type );
00843     return 1.0;
00844     }
00845 
00846 KWIN_COMPARE_PREDICATE( WrapperIdMatchPredicate, Client, Window, cl->wrapperId() == value );
00847 
00848 } // namespace
00849 
00850 #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
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.7
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