KWin
geometry.cpp File Reference
#include "client.h"#include "workspace.h"#include <kapplication.h>#include <kglobal.h>#include <QPainter>#include <kwindowsystem.h>#include "placement.h"#include "notifications.h"#include "geometrytip.h"#include "rules.h"#include "effects.h"#include <QX11Info>#include <kephal/screens.h>
Include dependency graph for geometry.cpp:

Go to the source code of this file.
Namespaces | |
| namespace | KWin |
Defines | |
| #define | ASPECT_CHECK_GROW_H |
| #define | ASPECT_CHECK_GROW_W |
| #define | ASPECT_CHECK_SHRINK_H_GROW_W |
| #define | ASPECT_CHECK_SHRINK_W_GROW_H |
| #define | SNAP_BORDER_BOTTOM |
| #define | SNAP_BORDER_LEFT |
| #define | SNAP_BORDER_RIGHT |
| #define | SNAP_BORDER_TOP |
| #define | SNAP_WINDOW_BOTTOM |
| #define | SNAP_WINDOW_C_BOTTOM |
| #define | SNAP_WINDOW_C_LEFT |
| #define | SNAP_WINDOW_C_RIGHT |
| #define | SNAP_WINDOW_C_TOP |
| #define | SNAP_WINDOW_LEFT |
| #define | SNAP_WINDOW_RIGHT |
| #define | SNAP_WINDOW_TOP |
| #define | WITHIN_HEIGHT |
| #define | WITHIN_WIDTH |
Variables | |
| static EatAllPaintEvents * | KWin::eater = 0 |
| static GeometryTip * | KWin::geometryTip = 0 |
| static QRect * | KWin::visible_bound = 0 |
Define Documentation
| #define ASPECT_CHECK_GROW_H |
Value:
if( max_aspect_w * h < max_aspect_h * w ) \ { \ int delta = int( w * max_aspect_h / max_aspect_w - h ) / height_inc * height_inc; \ if( h + delta <= max_height ) \ h += delta; \ }
| #define ASPECT_CHECK_GROW_W |
Value:
if( min_aspect_w * h > min_aspect_h * w ) \ { \ int delta = int( min_aspect_w * h / min_aspect_h - w ) / width_inc * width_inc; \ if( w + delta <= max_width ) \ w += delta; \ }
| #define ASPECT_CHECK_SHRINK_H_GROW_W |
Value:
if( min_aspect_w * h > min_aspect_h * w ) \ { \ int delta = int( h - w * min_aspect_h / min_aspect_w ) / height_inc * height_inc; \ if( h - delta >= min_height ) \ h -= delta; \ else \ { \ int delta = int( min_aspect_w * h / min_aspect_h - w ) / width_inc * width_inc; \ if( w + delta <= max_width ) \ w += delta; \ } \ }
| #define ASPECT_CHECK_SHRINK_W_GROW_H |
Value:
if( max_aspect_w * h < max_aspect_h * w ) \ { \ int delta = int( w - max_aspect_w * h / max_aspect_h ) / width_inc * width_inc; \ if( w - delta >= min_width ) \ w -= delta; \ else \ { \ int delta = int( w * max_aspect_h / max_aspect_w - h ) / height_inc * height_inc; \ if( h + delta <= max_height ) \ h += delta; \ } \ }
| #define SNAP_BORDER_BOTTOM |
Value:
if ((sOWO?(newry>ymax):true) && (qAbs(ymax-newry)<deltaY)) \ { \ deltaY = qAbs(ymax-newcy); \ newry = ymax; \ }
| #define SNAP_BORDER_LEFT |
Value:
if ((sOWO?(newcx<xmin):true) && (qAbs(xmin-newcx)<deltaX)) \ { \ deltaX = qAbs(xmin-newcx); \ newcx = xmin; \ }
| #define SNAP_BORDER_RIGHT |
Value:
if ((sOWO?(newrx>xmax):true) && (qAbs(xmax-newrx)<deltaX)) \ { \ deltaX = qAbs(xmax-newrx); \ newrx = xmax; \ }
| #define SNAP_BORDER_TOP |
Value:
if ((sOWO?(newcy<ymin):true) && (qAbs(ymin-newcy)<deltaY)) \ { \ deltaY = qAbs(ymin-newcy); \ newcy = ymin; \ }
| #define SNAP_WINDOW_BOTTOM |
Value:
if ( (sOWO?(newry>ly):true) \ && WITHIN_WIDTH \ && (qAbs( ly - newry ) < deltaY) ) { \ deltaY = qAbs( ly - newry ); \ newry=ly; \ }
| #define SNAP_WINDOW_C_BOTTOM |
Value:
if ( (sOWO?(newry>lry):true) \ && (newcx == lrx || newrx == lx) \ && qAbs(lry-newry) < deltaY ) { \ deltaY = qAbs( lry - newry - 1 ); \ newry = lry - 1; \ }
| #define SNAP_WINDOW_C_LEFT |
Value:
if ( (sOWO?(newcx<lx):true) \ && (newcy == lry || newry == ly) \ && qAbs(lx-newcx) < deltaX ) { \ deltaX = qAbs( lx - newcx + 1 ); \ newcx = lx + 1; \ }
| #define SNAP_WINDOW_C_RIGHT |
Value:
if ( (sOWO?(newrx>lrx):true) \ && (newcy == lry || newry == ly) \ && qAbs(lrx-newrx) < deltaX ) { \ deltaX = qAbs( lrx - newrx - 1 ); \ newrx = lrx - 1; \ }
| #define SNAP_WINDOW_C_TOP |
Value:
if ( (sOWO?(newcy<ly):true) \ && (newcx == lrx || newrx == lx) \ && qAbs(ly-newcy) < deltaY ) { \ deltaY = qAbs( ly - newcy + 1 ); \ newcy = ly + 1; \ }
| #define SNAP_WINDOW_LEFT |
Value:
if ( (sOWO?(newcx<lrx):true) \ && WITHIN_HEIGHT \ && (qAbs( lrx - newcx ) < deltaX)) { \ deltaX = qAbs( lrx - newcx ); \ newcx=lrx; \ }
| #define SNAP_WINDOW_RIGHT |
Value:
if ( (sOWO?(newrx>lx):true) \ && WITHIN_HEIGHT \ && (qAbs( lx - newrx ) < deltaX)) \ { \ deltaX = qAbs( lx - newrx ); \ newrx=lx; \ }
| #define SNAP_WINDOW_TOP |
Value:
if ( (sOWO?(newcy<lry):true) \ && WITHIN_WIDTH \ && (qAbs( lry - newcy ) < deltaY) ) { \ deltaY = qAbs( lry - newcy ); \ newcy=lry; \ }
| #define WITHIN_HEIGHT |
Value:
((( newcy <= lry ) && ( newcy >= ly )) || \
(( newry >= ly ) && ( newry <= lry )) || \
(( newcy <= ly ) && ( newry >= lry )) )
| #define WITHIN_WIDTH |
Value:
( (( cx <= lrx ) && ( cx >= lx )) || \
(( rx >= lx ) && ( rx <= lrx )) || \
(( cx <= lx ) && ( rx >= lrx )) )
KDE 4.2 API Reference