00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef KWIN_CLIENT_H
00013 #define KWIN_CLIENT_H
00014
00015 #include <qframe.h>
00016 #include <qvbox.h>
00017 #include <qpixmap.h>
00018 #include <netwm.h>
00019 #include <kdebug.h>
00020 #include <assert.h>
00021 #include <X11/X.h>
00022 #include <X11/Xlib.h>
00023 #include <X11/Xutil.h>
00024 #include <fixx11h.h>
00025
00026 #include "utils.h"
00027 #include "options.h"
00028 #include "workspace.h"
00029 #include "kdecoration.h"
00030 #include "rules.h"
00031
00032 class QTimer;
00033 class KProcess;
00034 class KStartupInfoData;
00035
00036 namespace KWinInternal
00037 {
00038
00039 class Workspace;
00040 class Client;
00041 class WinInfo;
00042 class SessionInfo;
00043 class Bridge;
00044
00045 class Client : public QObject, public KDecorationDefines
00046 {
00047 Q_OBJECT
00048 public:
00049 Client( Workspace *ws );
00050 Window window() const;
00051 Window frameId() const;
00052 Window wrapperId() const;
00053 Window decorationId() const;
00054
00055 Workspace* workspace() const;
00056 const Client* transientFor() const;
00057 Client* transientFor();
00058 bool isTransient() const;
00059 bool groupTransient() const;
00060 bool wasOriginallyGroupTransient() const;
00061 ClientList mainClients() const;
00062 bool hasTransient( const Client* c, bool indirect ) const;
00063 const ClientList& transients() const;
00064 void checkTransient( Window w );
00065 Client* findModal();
00066 const Group* group() const;
00067 Group* group();
00068 void checkGroup( Group* gr = NULL, bool force = false );
00069
00070 NET::WindowType windowType( bool direct = false, int supported_types = SUPPORTED_WINDOW_TYPES_MASK ) const;
00071 const WindowRules* rules() const;
00072
00073 QRect geometry() const;
00074 QSize size() const;
00075 QSize minSize() const;
00076 QSize maxSize() const;
00077 QPoint pos() const;
00078 QRect rect() const;
00079 int x() const;
00080 int y() const;
00081 int width() const;
00082 int height() const;
00083 QPoint clientPos() const;
00084 QSize clientSize() const;
00085
00086 bool windowEvent( XEvent* e );
00087 virtual bool eventFilter( QObject* o, QEvent* e );
00088
00089 bool manage( Window w, bool isMapped );
00090
00091 void releaseWindow( bool on_shutdown = false );
00092
00093 enum Sizemode
00094 {
00095 SizemodeAny,
00096 SizemodeFixedW,
00097 SizemodeFixedH,
00098 SizemodeMax,
00099 SizemodeShaded
00100 };
00101 QSize adjustedSize( const QSize&, Sizemode mode = SizemodeAny ) const;
00102
00103 QPixmap icon() const;
00104 QPixmap miniIcon() const;
00105
00106 bool isActive() const;
00107 void setActive( bool );
00108
00109 int desktop() const;
00110 void setDesktop( int );
00111 bool isOnDesktop( int d ) const;
00112 bool isOnCurrentDesktop() const;
00113 bool isOnAllDesktops() const;
00114 void setOnAllDesktops( bool set );
00115
00116
00117 bool isShown( bool shaded_is_shown ) const;
00118
00119 bool isShade() const;
00120 ShadeMode shadeMode() const;
00121 void setShade( ShadeMode mode );
00122 bool isShadeable() const;
00123
00124 bool isMinimized() const;
00125 bool isMaximizable() const;
00126 QRect geometryRestore() const;
00127 MaximizeMode maximizeMode() const;
00128 bool isMinimizable() const;
00129 void setMaximize( bool vertically, bool horizontally );
00130
00131 void setFullScreen( bool set, bool user );
00132 bool isFullScreen() const;
00133 bool isFullScreenable( bool fullscreen_hack = false ) const;
00134 bool userCanSetFullScreen() const;
00135 QRect geometryFSRestore() const { return geom_fs_restore; }
00136 int fullScreenMode() const { return fullscreen_mode; }
00137
00138 bool isUserNoBorder() const;
00139 void setUserNoBorder( bool set );
00140 bool userCanSetNoBorder() const;
00141 bool noBorder() const;
00142
00143 bool skipTaskbar( bool from_outside = false ) const;
00144 void setSkipTaskbar( bool set, bool from_outside );
00145
00146 bool skipPager() const;
00147 void setSkipPager( bool );
00148
00149 bool keepAbove() const;
00150 void setKeepAbove( bool );
00151 bool keepBelow() const;
00152 void setKeepBelow( bool );
00153 Layer layer() const;
00154 Layer belongsToLayer() const;
00155 void invalidateLayer();
00156
00157 void setModal( bool modal );
00158 bool isModal() const;
00159
00160
00161 bool wantsTabFocus() const;
00162 bool wantsInput() const;
00163 bool hasNETSupport() const;
00164 bool isMovable() const;
00165 bool isDesktop() const;
00166 bool isDock() const;
00167 bool isToolbar() const;
00168 bool isTopMenu() const;
00169 bool isMenu() const;
00170 bool isNormalWindow() const;
00171 bool isDialog() const;
00172 bool isSplash() const;
00173 bool isUtility() const;
00174 bool isOverride() const;
00175
00176
00177
00178
00179 bool isSpecialWindow() const;
00180
00181 bool isResizable() const;
00182 bool isCloseable() const;
00183
00184 void takeActivity( int flags, bool handled, allowed_t );
00185 void takeFocus( allowed_t );
00186 void demandAttention( bool set = true );
00187
00188 void setMask( const QRegion& r, int mode = X::Unsorted );
00189 QRegion mask() const;
00190
00191 void updateDecoration( bool check_workspace_pos, bool force = false );
00192 void checkBorderSizes();
00193
00194
00195 bool shape() const;
00196 void updateShape();
00197
00198 void setGeometry( int x, int y, int w, int h, ForceGeometry_t force = NormalGeometrySet );
00199 void setGeometry( const QRect& r, ForceGeometry_t force = NormalGeometrySet );
00200 void move( int x, int y, ForceGeometry_t force = NormalGeometrySet );
00201 void move( const QPoint & p, ForceGeometry_t force = NormalGeometrySet );
00202
00203 void plainResize( int w, int h, ForceGeometry_t force = NormalGeometrySet );
00204 void plainResize( const QSize& s, ForceGeometry_t force = NormalGeometrySet );
00205 void keepInArea( const QRect& area );
00206
00207 void growHorizontal();
00208 void shrinkHorizontal();
00209 void growVertical();
00210 void shrinkVertical();
00211
00212 bool providesContextHelp() const;
00213
00214 bool performMouseCommand( Options::MouseCommand, QPoint globalPos, bool handled = false );
00215
00216 QCString windowRole() const;
00217 QCString sessionId();
00218 QCString resourceName() const;
00219 QCString resourceClass() const;
00220 QCString wmCommand();
00221 QCString wmClientMachine( bool use_localhost ) const;
00222 Window wmClientLeader() const;
00223 pid_t pid() const;
00224
00225 QRect adjustedClientArea( const QRect& desktop, const QRect& area ) const;
00226
00227 Colormap colormap() const;
00228
00229
00230 void hideClient( bool hide );
00231
00232 void virtualDesktopChange();
00233
00234 QString caption( bool full = true ) const;
00235
00236 void keyPressEvent( uint key_code );
00237 void updateMouseGrab();
00238 Window moveResizeGrabWindow() const;
00239
00240 const QPoint calculateGravitation( bool invert, int gravity = 0 ) const;
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 static QCString staticWindowRole(WId);
00249 static QCString staticSessionId(WId);
00250 static QCString staticWmCommand(WId);
00251 static QCString staticWmClientMachine(WId);
00252 static Window staticWmClientLeader(WId);
00253
00254 void checkWorkspacePosition();
00255 void updateUserTime( Time time = CurrentTime );
00256 Time userTime() const;
00257 bool hasUserTimeSupport() const;
00258 bool ignoreFocusStealing() const;
00259
00260
00261 static void deleteClient( Client* c, allowed_t );
00262
00263 static bool resourceMatch( const Client* c1, const Client* c2 );
00264 static bool belongToSameApplication( const Client* c1, const Client* c2, bool active_hack = false );
00265 static void readIcons( Window win, QPixmap* icon, QPixmap* miniicon );
00266
00267 void minimize( bool avoid_animation = false );
00268 void unminimize( bool avoid_animation = false );
00269 void closeWindow();
00270 void killWindow();
00271 void maximize( MaximizeMode );
00272 void toggleShade();
00273 void showContextHelp();
00274 void cancelAutoRaise();
00275 void destroyClient();
00276
00277 private slots:
00278 void autoRaise();
00279 void shadeHover();
00280
00281 private:
00282 friend class Bridge;
00283 virtual void processMousePressEvent( QMouseEvent* e );
00284
00285 private:
00286
00287 virtual ~Client();
00288
00289 Position mousePosition( const QPoint& ) const;
00290 void setCursor( Position m );
00291 void setCursor( const QCursor& c );
00292
00293 void animateMinimizeOrUnminimize( bool minimize );
00294 QPixmap animationPixmap( int w );
00295
00296 void drawbound( const QRect& geom );
00297 void clearbound();
00298 void doDrawbound( const QRect& geom, bool clear );
00299
00300
00301 bool mapRequestEvent( XMapRequestEvent* e );
00302 void unmapNotifyEvent( XUnmapEvent*e );
00303 void destroyNotifyEvent( XDestroyWindowEvent*e );
00304 void configureRequestEvent( XConfigureRequestEvent* e );
00305 void propertyNotifyEvent( XPropertyEvent* e );
00306 void clientMessageEvent( XClientMessageEvent* e );
00307 void enterNotifyEvent( XCrossingEvent* e );
00308 void leaveNotifyEvent( XCrossingEvent* e );
00309 void visibilityNotifyEvent( XVisibilityEvent* e );
00310 void focusInEvent( XFocusInEvent* e );
00311 void focusOutEvent( XFocusOutEvent* e );
00312
00313 bool buttonPressEvent( Window w, int button, int state, int x, int y, int x_root, int y_root );
00314 bool buttonReleaseEvent( Window w, int button, int state, int x, int y, int x_root, int y_root );
00315 bool motionNotifyEvent( Window w, int state, int x, int y, int x_root, int y_root );
00316
00317 void processDecorationButtonPress( int button, int state, int x, int y, int x_root, int y_root );
00318
00319 private slots:
00320 void pingTimeout();
00321 void processKillerExited();
00322
00323 private:
00324
00325 void setMappingState( int s );
00326 int mappingState() const;
00327 bool isIconicState() const;
00328 bool isNormalState() const;
00329 bool isManaged() const;
00330 void updateAllowedActions( bool force = false );
00331 QSize sizeForClientSize( const QSize&, Sizemode mode = SizemodeAny ) const;
00332 void changeMaximize( bool horizontal, bool vertical, bool adjust );
00333 bool checkFullScreenHack( const QRect& geom ) const;
00334 void updateFullScreenHack( const QRect& geom );
00335 void getWmNormalHints();
00336 void getMotifHints();
00337 void getIcons();
00338 void getWmClientLeader();
00339 void fetchName();
00340 void fetchIconicName();
00341 QString readName() const;
00342 void setCaption( const QString& s, bool force = false );
00343 bool hasTransientInternal( const Client* c, bool indirect, ConstClientList& set ) const;
00344 void setupWindowRules( bool ignore_temporary );
00345 void updateWindowRules();
00346 void finishWindowRules();
00347
00348 void updateWorkareaDiffs();
00349 void checkDirection( int new_diff, int old_diff, QRect& rect, const QRect& area );
00350 static int computeWorkareaDiff( int left, int right, int a_left, int a_right );
00351 void configureRequest( int value_mask, int rx, int ry, int rw, int rh, int gravity, bool from_tool );
00352
00353 void resizeWithChecks( int w, int h, ForceGeometry_t force = NormalGeometrySet );
00354 void resizeWithChecks( const QSize& s, ForceGeometry_t force = NormalGeometrySet );
00355 NETExtendedStrut strut() const;
00356 bool hasStrut() const;
00357
00358 bool startMoveResize();
00359 void finishMoveResize( bool cancel );
00360 void leaveMoveResize();
00361 void checkUnrestrictedMoveResize();
00362 void handleMoveResize( int x, int y, int x_root, int y_root );
00363 void positionGeometryTip();
00364 void grabButton( int mod );
00365 void ungrabButton( int mod );
00366 void resetMaximize();
00367 void resizeDecoration( const QSize& s );
00368
00369 void pingWindow();
00370 void killProcess( bool ask, Time timestamp = CurrentTime );
00371 void updateUrgency();
00372 static void sendClientMessage( Window w, Atom a, Atom protocol,
00373 long data1 = 0, long data2 = 0, long data3 = 0 );
00374
00375 void embedClient( Window w, const XWindowAttributes &attr );
00376 void detectNoBorder();
00377 void destroyDecoration();
00378 void updateFrameStrut();
00379
00380 void rawShow();
00381 void rawHide();
00382
00383 Time readUserTimeMapTimestamp( const KStartupInfoId* asn_id, const KStartupInfoData* asn_data,
00384 bool session ) const;
00385 Time readUserCreationTime() const;
00386 static bool sameAppWindowRoleMatch( const Client* c1, const Client* c2, bool active_hack );
00387 void startupIdChanged();
00388
00389 Window client;
00390 Window wrapper;
00391 Window frame;
00392 KDecoration* decoration;
00393 Workspace* wspace;
00394 Bridge* bridge;
00395 int desk;
00396 bool buttonDown;
00397 bool moveResizeMode;
00398 bool move_faked_activity;
00399 Window move_resize_grab_window;
00400 bool unrestrictedMoveResize;
00401 bool isMove() const
00402 {
00403 return moveResizeMode && mode == PositionCenter;
00404 }
00405 bool isResize() const
00406 {
00407 return moveResizeMode && mode != PositionCenter;
00408 }
00409
00410 Position mode;
00411 QPoint moveOffset;
00412 QPoint invertedMoveOffset;
00413 QRect moveResizeGeom;
00414 QRect initialMoveResizeGeom;
00415 XSizeHints xSizeHint;
00416 void sendSyntheticConfigureNotify();
00417 int mapping_state;
00418 void readTransient();
00419 Window verifyTransientFor( Window transient_for, bool set );
00420 void addTransient( Client* cl );
00421 void removeTransient( Client* cl );
00422 void removeFromMainClients();
00423 void cleanGrouping();
00424 void checkGroupTransients();
00425 void setTransient( Window new_transient_for_id );
00426 void checkActiveModal();
00427 Client* transient_for;
00428 Window transient_for_id;
00429 Window original_transient_for_id;
00430 ClientList transients_list;
00431 ShadeMode shade_mode;
00432 uint active :1;
00433 uint keep_above : 1;
00434 uint is_shape :1;
00435 uint skip_taskbar :1;
00436 uint original_skip_taskbar :1;
00437 uint Pdeletewindow :1;
00438 uint Ptakefocus :1;
00439 uint Ptakeactivity : 1;
00440 uint Pcontexthelp : 1;
00441 uint Pping : 1;
00442 uint input :1;
00443 uint skip_pager : 1;
00444 uint motif_noborder : 1;
00445 uint motif_may_resize : 1;
00446 uint motif_may_move :1;
00447 uint motif_may_close : 1;
00448 uint keep_below : 1;
00449 uint minimized : 1;
00450 uint hidden : 1;
00451 uint modal : 1;
00452 uint noborder : 1;
00453 uint user_noborder : 1;
00454 uint not_obscured : 1;
00455 uint urgency : 1;
00456 uint ignore_focus_stealing : 1;
00457 WindowRules client_rules;
00458 void getWMHints();
00459 void readIcons();
00460 void getWindowProtocols();
00461 QPixmap icon_pix;
00462 QPixmap miniicon_pix;
00463 QCursor cursor;
00464
00465
00466 enum FullScreenMode { FullScreenNone, FullScreenNormal, FullScreenHack };
00467 FullScreenMode fullscreen_mode;
00468 MaximizeMode max_mode;
00469 QRect geom_restore;
00470 QRect geom_fs_restore;
00471 int workarea_diff_x, workarea_diff_y;
00472 WinInfo* info;
00473 QTimer* autoRaiseTimer;
00474 QTimer* shadeHoverTimer;
00475 Colormap cmap;
00476 QCString resource_name;
00477 QCString resource_class;
00478 QString cap_normal, cap_iconic, cap_suffix;
00479 WId wmClientLeaderWin;
00480 QCString window_role;
00481 Group* in_group;
00482 Window window_group;
00483 Layer in_layer;
00484 QTimer* ping_timer;
00485 KProcess* process_killer;
00486 Time ping_timestamp;
00487 Time user_time;
00488 unsigned long allowed_actions;
00489 QRect frame_geometry;
00490 QSize client_size;
00491 int block_geometry;
00492 bool shade_geometry_change;
00493 int border_left, border_right, border_top, border_bottom;
00494 QRegion _mask;
00495 static bool check_active_modal;
00496 friend struct FetchNameInternalPredicate;
00497 friend struct CheckIgnoreFocusStealingProcedure;
00498 friend struct ResetupRulesProcedure;
00499 void show() { assert( false ); }
00500 void hide() { assert( false ); }
00501 };
00502
00503
00504 class WinInfo : public NETWinInfo
00505 {
00506 private:
00507 typedef KWinInternal::Client Client;
00508 public:
00509 WinInfo( Client* c, Display * display, Window window,
00510 Window rwin, const unsigned long pr[], int pr_size );
00511 virtual void changeDesktop(int desktop);
00512 virtual void changeState( unsigned long state, unsigned long mask );
00513 private:
00514 Client * m_client;
00515 };
00516
00517 inline Window Client::window() const
00518 {
00519 return client;
00520 }
00521
00522 inline Window Client::frameId() const
00523 {
00524 return frame;
00525 }
00526
00527 inline Window Client::wrapperId() const
00528 {
00529 return wrapper;
00530 }
00531
00532 inline Window Client::decorationId() const
00533 {
00534 return decoration != NULL ? decoration->widget()->winId() : None;
00535 }
00536
00537 inline Workspace* Client::workspace() const
00538 {
00539 return wspace;
00540 }
00541
00542 inline const Client* Client::transientFor() const
00543 {
00544 return transient_for;
00545 }
00546
00547 inline Client* Client::transientFor()
00548 {
00549 return transient_for;
00550 }
00551
00552 inline bool Client::groupTransient() const
00553 {
00554 return transient_for_id == workspace()->rootWin();
00555 }
00556
00557
00558
00559 inline bool Client::wasOriginallyGroupTransient() const
00560 {
00561 return original_transient_for_id == workspace()->rootWin();
00562 }
00563
00564 inline bool Client::isTransient() const
00565 {
00566 return transient_for_id != None;
00567 }
00568
00569 inline const ClientList& Client::transients() const
00570 {
00571 return transients_list;
00572 }
00573
00574 inline const Group* Client::group() const
00575 {
00576 return in_group;
00577 }
00578
00579 inline Group* Client::group()
00580 {
00581 return in_group;
00582 }
00583
00584 inline int Client::mappingState() const
00585 {
00586 return mapping_state;
00587 }
00588
00589 inline QCString Client::resourceName() const
00590 {
00591 return resource_name;
00592 }
00593
00594 inline QCString Client::resourceClass() const
00595 {
00596 return resource_class;
00597 }
00598
00599 inline
00600 bool Client::isMinimized() const
00601 {
00602 return minimized;
00603 }
00604
00605 inline bool Client::isActive() const
00606 {
00607 return active;
00608 }
00609
00616 inline int Client::desktop() const
00617 {
00618 return desk;
00619 }
00620
00621 inline bool Client::isOnAllDesktops() const
00622 {
00623 return desk == NET::OnAllDesktops;
00624 }
00629 inline bool Client::isOnDesktop( int d ) const
00630 {
00631 return desk == d || isOnAllDesktops();
00632 }
00633
00634 inline
00635 bool Client::isShown( bool shaded_is_shown ) const
00636 {
00637 return !isMinimized() && ( !isShade() || shaded_is_shown ) && !hidden;
00638 }
00639
00640 inline
00641 bool Client::isShade() const
00642 {
00643 return shade_mode == ShadeNormal;
00644 }
00645
00646 inline
00647 ShadeMode Client::shadeMode() const
00648 {
00649 return shade_mode;
00650 }
00651
00652 inline QPixmap Client::icon() const
00653 {
00654 return icon_pix;
00655 }
00656
00657 inline QPixmap Client::miniIcon() const
00658 {
00659 return miniicon_pix;
00660 }
00661
00662 inline QRect Client::geometryRestore() const
00663 {
00664 return geom_restore;
00665 }
00666
00667 inline Client::MaximizeMode Client::maximizeMode() const
00668 {
00669 return max_mode;
00670 }
00671
00672 inline bool Client::skipTaskbar( bool from_outside ) const
00673 {
00674 return from_outside ? original_skip_taskbar : skip_taskbar;
00675 }
00676
00677 inline bool Client::skipPager() const
00678 {
00679 return skip_pager;
00680 }
00681
00682 inline bool Client::keepAbove() const
00683 {
00684 return keep_above;
00685 }
00686
00687 inline bool Client::keepBelow() const
00688 {
00689 return keep_below;
00690 }
00691
00692 inline bool Client::shape() const
00693 {
00694 return is_shape;
00695 }
00696
00697
00698 inline bool Client::isFullScreen() const
00699 {
00700 return fullscreen_mode != FullScreenNone;
00701 }
00702
00703 inline bool Client::isModal() const
00704 {
00705 return modal;
00706 }
00707
00708 inline bool Client::hasNETSupport() const
00709 {
00710 return info->hasNETSupport();
00711 }
00712
00713 inline Colormap Client::colormap() const
00714 {
00715 return cmap;
00716 }
00717
00718 inline pid_t Client::pid() const
00719 {
00720 return info->pid();
00721 }
00722
00723 inline void Client::invalidateLayer()
00724 {
00725 in_layer = UnknownLayer;
00726 }
00727
00728 inline bool Client::isIconicState() const
00729 {
00730 return mapping_state == IconicState;
00731 }
00732
00733 inline bool Client::isNormalState() const
00734 {
00735 return mapping_state == NormalState;
00736 }
00737
00738 inline bool Client::isManaged() const
00739 {
00740 return mapping_state != WithdrawnState;
00741 }
00742
00743 inline QCString Client::windowRole() const
00744 {
00745 return window_role;
00746 }
00747
00748 inline QRect Client::geometry() const
00749 {
00750 return frame_geometry;
00751 }
00752
00753 inline QSize Client::size() const
00754 {
00755 return frame_geometry.size();
00756 }
00757
00758 inline QPoint Client::pos() const
00759 {
00760 return frame_geometry.topLeft();
00761 }
00762
00763 inline int Client::x() const
00764 {
00765 return frame_geometry.x();
00766 }
00767
00768 inline int Client::y() const
00769 {
00770 return frame_geometry.y();
00771 }
00772
00773 inline int Client::width() const
00774 {
00775 return frame_geometry.width();
00776 }
00777
00778 inline int Client::height() const
00779 {
00780 return frame_geometry.height();
00781 }
00782
00783 inline QRect Client::rect() const
00784 {
00785 return QRect( 0, 0, width(), height());
00786 }
00787
00788 inline QPoint Client::clientPos() const
00789 {
00790 return QPoint( border_left, border_top );
00791 }
00792
00793 inline QSize Client::clientSize() const
00794 {
00795 return client_size;
00796 }
00797
00798 inline void Client::setGeometry( const QRect& r, ForceGeometry_t force )
00799 {
00800 setGeometry( r.x(), r.y(), r.width(), r.height(), force );
00801 }
00802
00803 inline void Client::move( const QPoint & p, ForceGeometry_t force )
00804 {
00805 move( p.x(), p.y(), force );
00806 }
00807
00808 inline void Client::plainResize( const QSize& s, ForceGeometry_t force )
00809 {
00810 plainResize( s.width(), s.height(), force );
00811 }
00812
00813 inline void Client::resizeWithChecks( const QSize& s, ForceGeometry_t force )
00814 {
00815 resizeWithChecks( s.width(), s.height(), force );
00816 }
00817
00818 inline bool Client::hasUserTimeSupport() const
00819 {
00820 return info->userTime() != -1U;
00821 }
00822
00823 inline bool Client::ignoreFocusStealing() const
00824 {
00825 return ignore_focus_stealing;
00826 }
00827
00828 inline const WindowRules* Client::rules() const
00829 {
00830 return &client_rules;
00831 }
00832
00833 KWIN_PROCEDURE( CheckIgnoreFocusStealingProcedure, cl->ignore_focus_stealing = options->checkIgnoreFocusStealing( cl ));
00834
00835 inline Window Client::moveResizeGrabWindow() const
00836 {
00837 return move_resize_grab_window;
00838 }
00839
00840 #ifdef NDEBUG
00841 inline
00842 kndbgstream& operator<<( kndbgstream& stream, const Client* ) { return stream; }
00843 inline
00844 kndbgstream& operator<<( kndbgstream& stream, const ClientList& ) { return stream; }
00845 inline
00846 kndbgstream& operator<<( kndbgstream& stream, const ConstClientList& ) { return stream; }
00847 #else
00848 kdbgstream& operator<<( kdbgstream& stream, const Client* );
00849 kdbgstream& operator<<( kdbgstream& stream, const ClientList& );
00850 kdbgstream& operator<<( kdbgstream& stream, const ConstClientList& );
00851 #endif
00852
00853 KWIN_COMPARE_PREDICATE( WindowMatchPredicate, Window, cl->window() == value );
00854 KWIN_COMPARE_PREDICATE( FrameIdMatchPredicate, Window, cl->frameId() == value );
00855 KWIN_COMPARE_PREDICATE( WrapperIdMatchPredicate, Window, cl->wrapperId() == value );
00856
00857 }
00858
00859 #endif