• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kde-workspace API Reference
  • KDE Home
  • Contact Us
 

KWin

  • kde-4.x
  • kde-workspace
  • kwin
Namespaces | Macros | Functions | Variables
geometry.cpp File Reference
#include "client.h"
#include "composite.h"
#include "cursor.h"
#include "netinfo.h"
#include "workspace.h"
#include "placement.h"
#include "geometrytip.h"
#include "rules.h"
#include "screens.h"
#include "effects.h"
#include <QApplication>
#include <QDebug>
#include <QDesktopWidget>
#include <QVarLengthArray>
#include "outline.h"
Include dependency graph for geometry.cpp:

Go to the source code of this file.

Namespaces

 KWin
 

Macros

#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
 

Functions

static int KWin::sign (int v)
 

Variables

static bool KWin::changeMaximizeRecursion = false
 
static GeometryTip * KWin::geometryTip = 0
 

Macro Definition 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; \
}
WITHIN_WIDTH
#define WITHIN_WIDTH
#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; \
}
WITHIN_HEIGHT
#define WITHIN_HEIGHT
#define SNAP_WINDOW_RIGHT
Value:
if ( (sOWO?(newrx>lx):true) \
&& WITHIN_HEIGHT \
&& (qAbs( lx - newrx ) < deltaX)) \
{ \
deltaX = qAbs( lx - newrx ); \
newrx=lx; \
}
WITHIN_HEIGHT
#define WITHIN_HEIGHT
#define SNAP_WINDOW_TOP
Value:
if ( (sOWO?(newcy<lry):true) \
&& WITHIN_WIDTH \
&& (qAbs( lry - newcy ) < deltaY) ) { \
deltaY = qAbs( lry - newcy ); \
newcy=lry; \
}
WITHIN_WIDTH
#define WITHIN_WIDTH
#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 )) )
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Sun Dec 15 2019 02:34:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KWin

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

kde-workspace API Reference

Skip menu "kde-workspace API Reference"
  • KWin
  •   KWin Decoration Library
  •   KWin Effects Library
  • Plasma
  • Plasma
  •   Applets
  •   Engines
  •   libkworkspace
  •   libtaskmanager
  • System Settings
  •   SystemSettingsView

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal