summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErkin Bahceci <erkinbah@gmail.com>2009-07-17 17:20:23 -0500
committerErkin Bahceci <erkinbah@gmail.com>2009-07-17 17:20:23 -0500
commit1539fce79cc73bb31732cd3f2ad02be0d7b52821 (patch)
tree32805fcac0de3cf1b21e946b8b903578bf0c7ead
parent7fff3541afc6595dd7f64ef7abeb587c254b4b41 (diff)
downloadunity-window-decorator-1539fce79cc73bb31732cd3f2ad02be0d7b52821.tar.gz
unity-window-decorator-1539fce79cc73bb31732cd3f2ad02be0d7b52821.tar.bz2
Convert Bool -> bool, TRUE -> true, FALSE -> false.
-rw-r--r--plugins/blur/src/blur.cpp12
-rw-r--r--plugins/blur/src/blur.h2
-rw-r--r--plugins/composite/src/screen.cpp2
-rw-r--r--plugins/copytex/src/copytex.cpp6
-rw-r--r--plugins/decor/src/decor.cpp16
-rw-r--r--plugins/gnomecompat/src/gnomecompat.cpp8
-rw-r--r--plugins/imgsvg/src/imgsvg.cpp2
-rw-r--r--plugins/kde/src/kde.cpp2
-rw-r--r--plugins/opengl/src/matrix.cpp10
-rw-r--r--plugins/opengl/src/screen.cpp4
-rw-r--r--plugins/place/src/place.cpp10
-rw-r--r--plugins/regex/src/regex.cpp2
-rw-r--r--plugins/resize/src/resize.cpp2
-rw-r--r--plugins/scale/src/scale.cpp6
-rw-r--r--plugins/switcher/src/switcher.cpp4
-rw-r--r--plugins/switcher/src/switcher.h4
-rw-r--r--plugins/water/src/water.cpp2
-rw-r--r--plugins/zoom/src/zoom.cpp2
-rw-r--r--src/event.cpp4
-rw-r--r--src/main.cpp2
-rw-r--r--src/plugin.cpp2
-rw-r--r--src/screen.cpp64
-rw-r--r--src/session.cpp12
-rw-r--r--src/window.cpp50
24 files changed, 115 insertions, 115 deletions
diff --git a/plugins/blur/src/blur.cpp b/plugins/blur/src/blur.cpp
index 8689ee1..a150acb 100644
--- a/plugins/blur/src/blur.cpp
+++ b/plugins/blur/src/blur.cpp
@@ -304,7 +304,7 @@ BlurWindow::update (int state)
std::vector<BlurBox> boxes;
result = XGetWindowProperty (screen->dpy (), window->id (),
- bScreen->blurAtom[state], 0L, 8192L, FALSE,
+ bScreen->blurAtom[state], 0L, 8192L, false,
XA_INTEGER, &actual, &format,
&n, &left, &propData);
@@ -1108,7 +1108,7 @@ BlurScreen::fboUpdate (BoxPtr pBox,
int nBox)
{
int i, y, iTC = 0;
- Bool wasCulled = glIsEnabled (GL_CULL_FACE);
+ bool wasCulled = glIsEnabled (GL_CULL_FACE);
if (GL::maxTextureUnits && optionGetIndependentTex ())
iTC = MIN ((GL::maxTextureUnits - 1) / 2, numTexop);
@@ -1482,7 +1482,7 @@ BlurWindow::updateDstTexture (const GLMatrix &transform,
textures = 2;
}
- bScreen->fboStatus = FALSE;
+ bScreen->fboStatus = false;
for (i = 0; i < textures; i++)
{
@@ -1590,7 +1590,7 @@ BlurWindow::glDraw (const GLMatrix &transform,
if (state[BLUR_STATE_DECOR].threshold || clientThreshold)
{
- bool clipped = FALSE;
+ bool clipped = false;
CompRect box (0, 0, 0, 0);
CompRegion reg;
@@ -2111,8 +2111,8 @@ blurPulse (CompAction *action,
BLUR_SCREEN (screen);
BLUR_WINDOW (w);
- bw->pulse = TRUE;
- bs->moreBlur = TRUE;
+ bw->pulse = true;
+ bs->moreBlur = true;
bw->cWindow->addDamage ();
}
diff --git a/plugins/blur/src/blur.h b/plugins/blur/src/blur.h
index 980fb25..a03c5dd 100644
--- a/plugins/blur/src/blur.h
+++ b/plugins/blur/src/blur.h
@@ -162,7 +162,7 @@ class BlurScreen :
GLuint program;
int maxTemp;
GLuint fbo;
- Bool fboStatus;
+ bool fboStatus;
float amp[BLUR_GAUSSIAN_RADIUS_MAX];
float pos[BLUR_GAUSSIAN_RADIUS_MAX];
diff --git a/plugins/composite/src/screen.cpp b/plugins/composite/src/screen.cpp
index ca07a45..69237a1 100644
--- a/plugins/composite/src/screen.cpp
+++ b/plugins/composite/src/screen.cpp
@@ -332,7 +332,7 @@ PrivateCompositeScreen::init ()
}
}
- attr.override_redirect = TRUE;
+ attr.override_redirect = true;
attr.event_mask = PropertyChangeMask;
newCmSnOwner =
diff --git a/plugins/copytex/src/copytex.cpp b/plugins/copytex/src/copytex.cpp
index 95188c3..faee8f9 100644
--- a/plugins/copytex/src/copytex.cpp
+++ b/plugins/copytex/src/copytex.cpp
@@ -158,7 +158,7 @@ CopyTexture::update ()
if (!damage.width () || !damage.height ())
return;
- gcv.graphics_exposures = FALSE;
+ gcv.graphics_exposures = false;
gcv.subwindow_mode = IncludeInferiors;
gc = XCreateGC (screen->dpy (), cp->pixmap,
GCGraphicsExposures | GCSubwindowMode, &gcv);
@@ -175,7 +175,7 @@ CopyTexture::update ()
XCopyArea (screen->dpy (), cp->pixmap, tmpPix, gc,
dim.x () + damage.x (), dim.y () + damage.y (),
damage.width (), damage.height (), 0, 0);
- XSync (screen->dpy (), FALSE);
+ XSync (screen->dpy (), false);
if (cs->useShm)
addr = cs->shmInfo.shmaddr;
@@ -298,7 +298,7 @@ CopytexScreen::CopytexScreen (CompScreen *screen) :
if (useShm)
{
- shmInfo.readOnly = FALSE;
+ shmInfo.readOnly = false;
if (!XShmAttach (screen->dpy (), &shmInfo))
{
shmdt (shmInfo.shmaddr);
diff --git a/plugins/decor/src/decor.cpp b/plugins/decor/src/decor.cpp
index f46dc51..e83fda6 100644
--- a/plugins/decor/src/decor.cpp
+++ b/plugins/decor/src/decor.cpp
@@ -299,7 +299,7 @@ Decoration::create (Window id,
int type;
result = XGetWindowProperty (screen->dpy (), id,
- decorAtom, 0L, 1024L, FALSE,
+ decorAtom, 0L, 1024L, false,
XA_INTEGER, &actual, &format,
&n, &nleft, &data);
@@ -886,7 +886,7 @@ DecorWindow::updateInputFrame ()
XSetWindowAttributes attr;
attr.event_mask = StructureNotifyMask;
- attr.override_redirect = TRUE;
+ attr.override_redirect = true;
inputFrame = XCreateWindow (screen->dpy (), window->frame (),
x, y, width, height, 0, CopyFromParent,
@@ -895,7 +895,7 @@ DecorWindow::updateInputFrame ()
&attr);
XGrabButton (screen->dpy (), AnyButton, AnyModifier, inputFrame,
- TRUE, ButtonPressMask | ButtonReleaseMask |
+ true, ButtonPressMask | ButtonReleaseMask |
ButtonMotionMask, GrabModeSync, GrabModeSync, None,
None);
@@ -999,7 +999,7 @@ DecorWindow::updateOutputFrame ()
attr.background_pixel = 0x0;
attr.event_mask = StructureNotifyMask;
- attr.override_redirect = TRUE;
+ attr.override_redirect = true;
outputFrame = XCreateWindow (screen->dpy (), window->frame (),
x, y, width, height, 0, CopyFromParent,
@@ -1008,7 +1008,7 @@ DecorWindow::updateOutputFrame ()
&attr);
XGrabButton (screen->dpy (), AnyButton, AnyModifier, outputFrame,
- TRUE, ButtonPressMask | ButtonReleaseMask |
+ true, ButtonPressMask | ButtonReleaseMask |
ButtonMotionMask, GrabModeSync, GrabModeSync, None,
None);
@@ -1096,7 +1096,7 @@ DecorScreen::checkForDm (bool updateWindows)
Window dmWin = None;
result = XGetWindowProperty (screen->dpy (), screen->root (),
- supportingDmCheckAtom, 0L, 1L, FALSE,
+ supportingDmCheckAtom, 0L, 1L, false,
XA_WINDOW, &actual, &format,
&n, &left, &data);
@@ -1116,7 +1116,7 @@ DecorScreen::checkForDm (bool updateWindows)
else
{
result = XGetWindowProperty (screen->dpy (), dmWin,
- decorTypeAtom, 0L, 2L, FALSE,
+ decorTypeAtom, 0L, 2L, false,
XA_ATOM, &actual, &format,
&n, &left, &data);
if (result == Success && n && data)
@@ -1556,7 +1556,7 @@ DecorWindow::resizeNotify (int dx, int dy, int dwidth, int dheight)
{
/* FIXME: we should not need a timer for calling decorWindowUpdate,
and only call updateWindowDecorationScale if decorWindowUpdate
- returns FALSE. Unfortunately, decorWindowUpdate may call
+ returns false. Unfortunately, decorWindowUpdate may call
updateWindowOutputExtents, which may call WindowResizeNotify. As
we never should call a wrapped function that's currently
processed, we need the timer for the moment. updateWindowOutputExtents
diff --git a/plugins/gnomecompat/src/gnomecompat.cpp b/plugins/gnomecompat/src/gnomecompat.cpp
index 1e241e6..1ded949 100644
--- a/plugins/gnomecompat/src/gnomecompat.cpp
+++ b/plugins/gnomecompat/src/gnomecompat.cpp
@@ -72,7 +72,7 @@ GnomeCompatScreen::panelAction (CompOption::Vector& options,
event.xclient.data.l[3] = 0;
event.xclient.data.l[4] = 0;
- XSendEvent (screen->dpy (), screen->root (), FALSE,
+ XSendEvent (screen->dpy (), screen->root (), false,
StructureNotifyMask, &event);
}
@@ -104,11 +104,11 @@ GnomeCompatScreen::GnomeCompatScreen (CompScreen *s) :
PluginClassHandler<GnomeCompatScreen, CompScreen> (s)
{
panelActionAtom =
- XInternAtom (screen->dpy (), "_GNOME_PANEL_ACTION", FALSE);
+ XInternAtom (screen->dpy (), "_GNOME_PANEL_ACTION", false);
panelMainMenuAtom =
- XInternAtom (screen->dpy (), "_GNOME_PANEL_ACTION_MAIN_MENU", FALSE);
+ XInternAtom (screen->dpy (), "_GNOME_PANEL_ACTION_MAIN_MENU", false);
panelRunDialogAtom =
- XInternAtom (screen->dpy (), "_GNOME_PANEL_ACTION_RUN_DIALOG", FALSE);
+ XInternAtom (screen->dpy (), "_GNOME_PANEL_ACTION_RUN_DIALOG", false);
#define COMMAND_BIND(opt) \
boost::bind (runCommand, _1, _2, _3, &mOptions[opt])
diff --git a/plugins/imgsvg/src/imgsvg.cpp b/plugins/imgsvg/src/imgsvg.cpp
index 328680e..a473898 100644
--- a/plugins/imgsvg/src/imgsvg.cpp
+++ b/plugins/imgsvg/src/imgsvg.cpp
@@ -149,7 +149,7 @@ SvgScreen::readSvgToImage (const char *file,
svgFile.close ();
svgHandle = rsvg_handle_new_from_file (file, &error);
if (!svgHandle)
- return FALSE;
+ return false;
rsvg_handle_get_dimensions (svgHandle, &svgDimension);
diff --git a/plugins/kde/src/kde.cpp b/plugins/kde/src/kde.cpp
index a7d7c2b..7565a25 100644
--- a/plugins/kde/src/kde.cpp
+++ b/plugins/kde/src/kde.cpp
@@ -61,7 +61,7 @@ KdeScreen::sendGlibNotify ()
memset (xev.xclient.data.l, 0, sizeof (xev.xclient.data.l));
- XSendEvent (dpy, screen->root (), FALSE,
+ XSendEvent (dpy, screen->root (), false,
SubstructureRedirectMask | SubstructureNotifyMask, &xev);
}
diff --git a/plugins/opengl/src/matrix.cpp b/plugins/opengl/src/matrix.cpp
index 656afef..738fa50 100644
--- a/plugins/opengl/src/matrix.cpp
+++ b/plugins/opengl/src/matrix.cpp
@@ -176,13 +176,13 @@ GLMatrix::rotate (const float angle,
float x = xRot, y = yRot, z = zRot;
float xx, yy, zz, xy, yz, zx, xs, ys, zs, one_c, s, c;
float matrix[16];
- Bool optimized;
+ bool optimized;
s = (float) sin (angle * DEG2RAD);
c = (float) cos (angle * DEG2RAD);
memcpy (matrix, identity, sizeof (matrix));
- optimized = FALSE;
+ optimized = false;
#define M(row, col) matrix[col * 4 + row]
@@ -192,7 +192,7 @@ GLMatrix::rotate (const float angle,
{
if (z != 0.0f)
{
- optimized = TRUE;
+ optimized = true;
/* rotate only around z-axis */
M(0,0) = c;
M(1,1) = c;
@@ -210,7 +210,7 @@ GLMatrix::rotate (const float angle,
}
else if (z == 0.0f)
{
- optimized = TRUE;
+ optimized = true;
/* rotate only around y-axis */
M(0,0) = c;
M(2,2) = c;
@@ -230,7 +230,7 @@ GLMatrix::rotate (const float angle,
{
if (z == 0.0f)
{
- optimized = TRUE;
+ optimized = true;
/* rotate only around x-axis */
M(1,1) = c;
M(2,2) = c;
diff --git a/plugins/opengl/src/screen.cpp b/plugins/opengl/src/screen.cpp
index 37d1833..8c2dc2e 100644
--- a/plugins/opengl/src/screen.cpp
+++ b/plugins/opengl/src/screen.cpp
@@ -728,13 +728,13 @@ PrivateGLScreen::updateScreenBackground ()
unsigned char *prop;
Pixmap pixmap = 0;
- pixmapAtom = XInternAtom (dpy, "PIXMAP", FALSE);
+ pixmapAtom = XInternAtom (dpy, "PIXMAP", false);
for (i = 0; pixmap == 0 && i < 2; i++)
{
status = XGetWindowProperty (dpy, screen->root (),
Atoms::xBackground[i],
- 0, 4, FALSE, AnyPropertyType,
+ 0, 4, false, AnyPropertyType,
&actualType, &actualFormat, &nItems,
&bytesAfter, &prop);
diff --git a/plugins/place/src/place.cpp b/plugins/place/src/place.cpp
index a23a725..af89f72 100644
--- a/plugins/place/src/place.cpp
+++ b/plugins/place/src/place.cpp
@@ -169,7 +169,7 @@ PlaceWindow::~PlaceWindow ()
bool
PlaceWindow::place (CompPoint &pos)
{
- Bool status = window->place (pos);
+ bool status = window->place (pos);
CompPoint viewport;
if (status)
@@ -576,7 +576,7 @@ PlaceWindow::placeSmart (const CompRect &workArea,
/* temp holder */
int basket;
/* CT lame flag. Don't like it. What else would do? */
- Bool firstPass = TRUE;
+ bool firstPass = true;
/* get the maximum allowed windows space */
int xTmp = workArea.x ();
@@ -644,7 +644,7 @@ PlaceWindow::placeSmart (const CompRect &workArea,
if (firstPass)
{
- firstPass = FALSE;
+ firstPass = false;
minOverlap = overlap;
}
/* CT save the best position and the minimum overlap up to now */
@@ -803,7 +803,7 @@ PlaceWindow::cascadeFindFirstFit (const CompWindowList &windows,
* of each existing window, aligned with the left/top of the
* existing window in each of those cases.
*/
- bool retval = FALSE;
+ bool retval = false;
CompWindowList belowSorted, rightSorted;
CompRect rect;
@@ -1205,7 +1205,7 @@ PlaceWindow::sendMaximizationRequest ()
xev.xclient.data.l[3] = 0;
xev.xclient.data.l[4] = 0;
- XSendEvent (dpy, screen->root (), FALSE,
+ XSendEvent (dpy, screen->root (), false,
SubstructureRedirectMask | SubstructureNotifyMask, &xev);
}
diff --git a/plugins/regex/src/regex.cpp b/plugins/regex/src/regex.cpp
index 85c3c4a..9be7272 100644
--- a/plugins/regex/src/regex.cpp
+++ b/plugins/regex/src/regex.cpp
@@ -175,7 +175,7 @@ RegexWindow::getStringProperty (Atom nameAtom,
int format, result;
result = XGetWindowProperty (screen->dpy (), window->id (), nameAtom, 0,
- LONG_MAX, FALSE, typeAtom, &type, &format,
+ LONG_MAX, false, typeAtom, &type, &format,
&nItems, &bytesAfter, (unsigned char **) &str);
if (result != Success)
diff --git a/plugins/resize/src/resize.cpp b/plugins/resize/src/resize.cpp
index 71efeb1..7186b2e 100644
--- a/plugins/resize/src/resize.cpp
+++ b/plugins/resize/src/resize.cpp
@@ -145,7 +145,7 @@ ResizeScreen::sendResizeNotify ()
xev.xclient.data.l[3] = geometry.height;
xev.xclient.data.l[4] = 0;
- XSendEvent (screen->dpy (), screen->root (), FALSE,
+ XSendEvent (screen->dpy (), screen->root (), false,
SubstructureRedirectMask | SubstructureNotifyMask, &xev);
}
diff --git a/plugins/scale/src/scale.cpp b/plugins/scale/src/scale.cpp
index c2f4665..b34620f 100644
--- a/plugins/scale/src/scale.cpp
+++ b/plugins/scale/src/scale.cpp
@@ -817,7 +817,7 @@ PrivateScaleScreen::donePaint ()
{
if (state == ScaleScreen::In)
{
- /* The FALSE activate event is sent when scale state
+ /* The false activate event is sent when scale state
goes back to normal, to avoid animation conflicts
with other plugins. */
activateEvent (false);
@@ -893,7 +893,7 @@ PrivateScaleScreen::sendDndStatusMessage (Window source)
xev.xclient.data.l[3] = 0;
xev.xclient.data.l[4] = None;
- XSendEvent (screen->dpy (), source, FALSE, 0, &xev);
+ XSendEvent (screen->dpy (), source, false, 0, &xev);
}
bool
@@ -974,7 +974,7 @@ PrivateScaleScreen::ensureDndRedirectWindow ()
XSetWindowAttributes attr;
long xdndVersion = 3;
- attr.override_redirect = TRUE;
+ attr.override_redirect = true;
dndTarget = XCreateWindow (screen->dpy (), screen->root (),
0, 0, 1, 1, 0, CopyFromParent,
diff --git a/plugins/switcher/src/switcher.cpp b/plugins/switcher/src/switcher.cpp
index 2056d63..622d1c7 100644
--- a/plugins/switcher/src/switcher.cpp
+++ b/plugins/switcher/src/switcher.cpp
@@ -280,7 +280,7 @@ SwitchScreen::switchToWindow (bool toNext)
xev.xclient.data.l[3] = 0;
xev.xclient.data.l[4] = 0;
- XSendEvent (screen->dpy (), screen->root (), FALSE,
+ XSendEvent (screen->dpy (), screen->root (), false,
SubstructureRedirectMask | SubstructureNotifyMask,
&xev);
}
@@ -765,7 +765,7 @@ SwitchScreen::updateForegroundColor ()
result = XGetWindowProperty (screen->dpy (), popupWindow,
- selectFgColorAtom, 0L, 4L, FALSE,
+ selectFgColorAtom, 0L, 4L, false,
XA_INTEGER, &actual, &format,
&n, &left, &propData);
diff --git a/plugins/switcher/src/switcher.h b/plugins/switcher/src/switcher.h
index f9a53e6..320dbbb 100644
--- a/plugins/switcher/src/switcher.h
+++ b/plugins/switcher/src/switcher.h
@@ -103,8 +103,8 @@ class SwitchScreen :
CompScreen::GrabHandle grabIndex;
- Bool switching;
- Bool zooming;
+ bool switching;
+ bool zooming;
int zoomMask;
bool moreAdjust;
diff --git a/plugins/water/src/water.cpp b/plugins/water/src/water.cpp
index a423bae..f0ce808 100644
--- a/plugins/water/src/water.cpp
+++ b/plugins/water/src/water.cpp
@@ -578,7 +578,7 @@ WaterScreen::softwareLines (XPoint *p,
float v)
{
int x1, y1, x2, y2;
- Bool steep;
+ bool steep;
int tmp;
int deltaX, deltaY;
int error = 0;
diff --git a/plugins/zoom/src/zoom.cpp b/plugins/zoom/src/zoom.cpp
index d3ec3e4..87fa9cf 100644
--- a/plugins/zoom/src/zoom.cpp
+++ b/plugins/zoom/src/zoom.cpp
@@ -381,7 +381,7 @@ zoomIn (CompAction *action,
zs->initiateForSelection (output);
- return TRUE;
+ return true;
}
static bool
diff --git a/src/event.cpp b/src/event.cpp
index 12a64ab..055a949 100644
--- a/src/event.cpp
+++ b/src/event.cpp
@@ -51,7 +51,7 @@ PrivateWindow::handleSyncAlarm ()
{
if (priv->syncWait)
{
- priv->syncWait = FALSE;
+ priv->syncWait = false;
if (window->resize (priv->syncGeometry))
{
@@ -1650,7 +1650,7 @@ CompScreen::handleEvent (XEvent *event)
event->xcrossing.mode != NotifyGrab &&
event->xcrossing.detail != NotifyInferior)
{
- Bool raise;
+ bool raise;
int delay;
raise = priv->optionGetAutoraise ();
diff --git a/src/main.cpp b/src/main.cpp
index 100de7b..ea8b509 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -105,7 +105,7 @@ main (int argc, char **argv)
char *displayName = 0;
std::vector<CompString> plugins;
int i;
- Bool disableSm = FALSE;
+ bool disableSm = false;
char *clientId = NULL;
programName = argv[0];
diff --git a/src/plugin.cpp b/src/plugin.cpp
index f6c3961..f5bf3f2 100644
--- a/src/plugin.cpp
+++ b/src/plugin.cpp
@@ -432,7 +432,7 @@ CompPlugin::load (const char *name)
{
CompPlugin *p;
char *home, *plugindir;
- Bool status;
+ bool status;
p = new CompPlugin ();
if (!p)
diff --git a/src/screen.cpp b/src/screen.cpp
index aa67332..6374594 100644
--- a/src/screen.cpp
+++ b/src/screen.cpp
@@ -536,7 +536,7 @@ CompScreen::checkForError (Display *dpy)
{
int e;
- XSync (dpy, FALSE);
+ XSync (dpy, false);
e = errors;
errors = 0;
@@ -911,7 +911,7 @@ convertProperty (Display *dpy,
/* Be sure the PropertyNotify has arrived so we
* can send SelectionNotify
*/
- XSync (dpy, FALSE);
+ XSync (dpy, false);
return true;
}
@@ -946,7 +946,7 @@ PrivateScreen::handleSelectionRequest (XEvent *event)
if (XGetWindowProperty (dpy,
event->xselectionrequest.requestor,
event->xselectionrequest.property,
- 0, 256, FALSE,
+ 0, 256, false,
Atoms::atomPair,
&type, &format, &num, &rest,
&data) != Success)
@@ -991,7 +991,7 @@ PrivateScreen::handleSelectionRequest (XEvent *event)
}
XSendEvent (dpy, event->xselectionrequest.requestor,
- FALSE, 0L, (XEvent *) &reply);
+ false, 0L, (XEvent *) &reply);
}
void
@@ -1002,7 +1002,7 @@ PrivateScreen::handleSelectionClear (XEvent *event)
wmSnAtom != event->xselectionclear.selection)
return;
- shutDown = TRUE;
+ shutDown = true;
}
#define HOME_IMAGEDIR ".compiz/images"
@@ -1060,7 +1060,7 @@ PrivateScreen::getActiveWindow (Window root)
Window w = None;
result = XGetWindowProperty (priv->dpy, root,
- Atoms::winActive, 0L, 1L, FALSE,
+ Atoms::winActive, 0L, 1L, false,
XA_WINDOW, &actual, &format,
&n, &left, &data);
@@ -1170,7 +1170,7 @@ PrivateScreen::getWmState (Window id)
unsigned long state = NormalState;
result = XGetWindowProperty (priv->dpy, id,
- Atoms::wmState, 0L, 2L, FALSE,
+ Atoms::wmState, 0L, 2L, false,
Atoms::wmState, &actual, &format,
&n, &left, &data);
@@ -1272,7 +1272,7 @@ PrivateScreen::getWindowState (Window id)
result = XGetWindowProperty (priv->dpy, id,
Atoms::winState,
- 0L, 1024L, FALSE, XA_ATOM, &actual, &format,
+ 0L, 1024L, false, XA_ATOM, &actual, &format,
&n, &left, &data);
if (result == Success && data)
@@ -1336,7 +1336,7 @@ PrivateScreen::getWindowType (Window id)
result = XGetWindowProperty (priv->dpy , id,
Atoms::winType,
- 0L, 1L, FALSE, XA_ATOM, &actual, &format,
+ 0L, 1L, false, XA_ATOM, &actual, &format,
&n, &left, &data);
if (result == Success && data)
@@ -1396,7 +1396,7 @@ PrivateScreen::getMwmHints (Window id,
result = XGetWindowProperty (priv->dpy, id,
Atoms::mwmHints,
- 0L, 20L, FALSE, Atoms::mwmHints,
+ 0L, 20L, false, Atoms::mwmHints,
&actual, &format, &n, &left, &data);
if (result == Success && data)
@@ -1457,7 +1457,7 @@ CompScreen::getWindowProp (Window id,
unsigned int retval = defaultValue;
result = XGetWindowProperty (priv->dpy, id, property,
- 0L, 1L, FALSE, XA_CARDINAL, &actual, &format,
+ 0L, 1L, false, XA_CARDINAL, &actual, &format,
&n, &left, &data);
if (result == Success && data)
@@ -1499,7 +1499,7 @@ PrivateScreen::readWindowProp32 (Window id,
bool retval = false;
result = XGetWindowProperty (priv->dpy, id, property,
- 0L, 1L, FALSE, XA_CARDINAL, &actual, &format,
+ 0L, 1L, false, XA_CARDINAL, &actual, &format,
&n, &left, &data);
if (result == Success && data)
@@ -2144,7 +2144,7 @@ PrivateScreen::getDesktopHints ()
{
result = XGetWindowProperty (dpy, root,
Atoms::numberOfDesktops,
- 0L, 1L, FALSE, XA_CARDINAL, &actual,
+ 0L, 1L, false, XA_CARDINAL, &actual,
&format, &n, &left, &propData);
if (result == Success && propData)
@@ -2161,7 +2161,7 @@ PrivateScreen::getDesktopHints ()
result = XGetWindowProperty (dpy, root,
Atoms::desktopViewport, 0L, 2L,
- FALSE, XA_CARDINAL, &actual, &format,
+ false, XA_CARDINAL, &actual, &format,
&n, &left, &propData);
if (result == Success && propData)
@@ -2182,7 +2182,7 @@ PrivateScreen::getDesktopHints ()
result = XGetWindowProperty (dpy, root,
Atoms::currentDesktop,
- 0L, 1L, FALSE, XA_CARDINAL, &actual,
+ 0L, 1L, false, XA_CARDINAL, &actual,
&format, &n, &left, &propData);
if (result == Success && propData)
@@ -2200,7 +2200,7 @@ PrivateScreen::getDesktopHints ()
result = XGetWindowProperty (dpy, root,
Atoms::showingDesktop,
- 0L, 1L, FALSE, XA_CARDINAL, &actual, &format,
+ 0L, 1L, false, XA_CARDINAL, &actual, &format,
&n, &left, &propData);
if (result == Success && propData)
@@ -2221,7 +2221,7 @@ PrivateScreen::getDesktopHints ()
XA_CARDINAL, 32, PropModeReplace,
(unsigned char *) data, 1);
- data[0] = showingDesktopMask ? TRUE : FALSE;
+ data[0] = showingDesktopMask ? true : false;
XChangeProperty (dpy, root, Atoms::showingDesktop,
XA_CARDINAL, 32, PropModeReplace,
@@ -2343,7 +2343,7 @@ CompScreen::focusDefaultWindow ()
}
else
{
- Bool status;
+ bool status;
Window rootReturn, childReturn;
int dummyInt;
unsigned int dummyUInt;
@@ -2553,7 +2553,7 @@ CompScreen::pushGrab (Cursor cursor, const char *name)
{
int status;
- status = XGrabPointer (priv->dpy, priv->grabWindow, TRUE,
+ status = XGrabPointer (priv->dpy, priv->grabWindow, true,
POINTER_GRAB_MASK,
GrabModeAsync, GrabModeAsync,
priv->root, cursor,
@@ -2562,7 +2562,7 @@ CompScreen::pushGrab (Cursor cursor, const char *name)
if (status == GrabSuccess)
{
status = XGrabKeyboard (priv->dpy,
- priv->grabWindow, TRUE,
+ priv->grabWindow, true,
GrabModeAsync, GrabModeAsync,
CurrentTime);
if (status != GrabSuccess)
@@ -2636,8 +2636,8 @@ CompScreen::removeGrab (CompScreen::GrabHandle handle,
}
/* otherScreenGrabExist takes a series of strings terminated by a NULL.
- It returns TRUE if a grab exists but it is NOT held by one of the
- plugins listed, returns FALSE otherwise. */
+ It returns true if a grab exists but it is NOT held by one of the
+ plugins listed, returns false otherwise. */
bool
CompScreen::otherGrabExist (const char *first, ...)
@@ -2691,7 +2691,7 @@ PrivateScreen::grabUngrabOneKey (unsigned int modifiers,
keycode,
modifiers,
root,
- TRUE,
+ true,
GrabModeAsync,
GrabModeAsync);
}
@@ -3086,8 +3086,8 @@ compareMappingOrder (const CompWindow *w1,
void
PrivateScreen::updateClientList ()
{
- Bool updateClientList = true;
- Bool updateClientListStacking = true;
+ bool updateClientList = true;
+ bool updateClientListStacking = true;
int n = 0;
screen->forEachWindow (boost::bind (countClientListWindow, _1, &n));
@@ -3200,7 +3200,7 @@ CompScreen::toolkitAction (Atom toolkitAction,
XUngrabPointer (priv->dpy, CurrentTime);
XUngrabKeyboard (priv->dpy, CurrentTime);
- XSendEvent (priv->dpy, priv->root, FALSE,
+ XSendEvent (priv->dpy, priv->root, false,
StructureNotifyMask, &ev);
}
@@ -3397,7 +3397,7 @@ CompScreen::sendWindowActivationRequest (Window id)
xev.xclient.data.l[3] = 0;
xev.xclient.data.l[4] = 0;
- XSendEvent (priv->dpy, priv->root, FALSE,
+ XSendEvent (priv->dpy, priv->root, false,
SubstructureRedirectMask | SubstructureNotifyMask, &xev);
}
@@ -3619,7 +3619,7 @@ CompScreen::outputDeviceForGeometry (const CompWindow::Geometry& gm)
/* it's not unique, select one output of the matching ones and use the
user preferred strategy for that */
unsigned int currentSize, bestOutputSize;
- Bool searchLargest;
+ bool searchLargest;
searchLargest =
(strategy != CoreOptions::OverlappingOutputsPreferSmallerOutput);
@@ -3782,7 +3782,7 @@ CompScreen::warpPointer (int dx,
0, 0, 0, 0,
pointerX, pointerY);
- XSync (priv->dpy, FALSE);
+ XSync (priv->dpy, false);
while (XCheckMaskEvent (priv->dpy,
LeaveWindowMask |
@@ -4012,7 +4012,7 @@ CompScreen::init (const char *name)
DisplayString (dpy));
#ifdef DEBUG
- XSynchronize (priv->dpy, TRUE);
+ XSynchronize (priv->dpy, true);
#endif
Atoms::init (priv->dpy);
@@ -4086,7 +4086,7 @@ CompScreen::init (const char *name)
XSelectInput (dpy, currentWmSnOwner, StructureNotifyMask);
}
- attr.override_redirect = TRUE;
+ attr.override_redirect = true;
attr.event_mask = PropertyChangeMask;
newWmSnOwner =
@@ -4130,7 +4130,7 @@ CompScreen::init (const char *name)
event.xclient.data.l[3] = 0;
event.xclient.data.l[4] = 0;
- XSendEvent (dpy, XRootWindow (dpy, DefaultScreen (dpy)), FALSE,
+ XSendEvent (dpy, XRootWindow (dpy, DefaultScreen (dpy)), false,
StructureNotifyMask, &event);
/* Wait for old window manager to go away */
diff --git a/src/session.cpp b/src/session.cpp
index 98cedd6..c05226c 100644
--- a/src/session.cpp
+++ b/src/session.cpp
@@ -283,7 +283,7 @@ CompSession::init (char *prevClientId)
errorBuffer);
else
{
- connected = TRUE;
+ connected = true;
if (prevClientId)
smPrevClientId = strdup (prevClientId);
}
@@ -298,7 +298,7 @@ CompSession::close ()
setRestartStyle (smcConnection, SmRestartIfRunning);
if (SmcCloseConnection (smcConnection, 0, NULL) != SmcConnectionInUse)
- connected = FALSE;
+ connected = false;
if (smClientId)
{
@@ -378,7 +378,7 @@ iceNewConnection (IceConn connection,
POLLIN | POLLPRI | POLLHUP | POLLERR,
boost::bind (iceProcessMessages, connection));
- iceConnected = 1;
+ iceConnected = true;
}
else
{
@@ -389,7 +389,7 @@ iceNewConnection (IceConn connection,
screen->removeWatchFd (iceWatchFdHandle);
iceWatchFdHandle = 0;
- iceConnected = 0;
+ iceConnected = false;
}
}
}
@@ -408,7 +408,7 @@ iceErrorHandler (IceConn connection)
static void
iceInit (void)
{
- static Bool iceInitialized = 0;
+ static bool iceInitialized = false;
if (!iceInitialized)
{
@@ -422,6 +422,6 @@ iceInit (void)
IceAddConnectionWatch (iceNewConnection, NULL);
- iceInitialized = 1;
+ iceInitialized = true;
}
}
diff --git a/src/window.cpp b/src/window.cpp
index 940deb7..fb8a6f2 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -956,7 +956,7 @@ PrivateWindow::updateStruts ()
result = XGetWindowProperty (screen->dpy (), priv->id,
Atoms::wmStrutPartial,
- 0L, 12L, FALSE, XA_CARDINAL, &actual, &format,
+ 0L, 12L, false, XA_CARDINAL, &actual, &format,
&n, &left, &data);
if (result == Success && data)
@@ -993,7 +993,7 @@ PrivateWindow::updateStruts ()
{
result = XGetWindowProperty (screen->dpy (), priv->id,
Atoms::wmStrut,
- 0L, 4L, FALSE, XA_CARDINAL,
+ 0L, 4L, false, XA_CARDINAL,
&actual, &format, &n, &left, &data);
if (result == Success && data)
@@ -1129,14 +1129,14 @@ setDefaultWindowAttributes (XWindowAttributes *wa)
wa->backing_store = NotUseful;
wa->backing_planes = 0;
wa->backing_pixel = 0;
- wa->save_under = FALSE;
+ wa->save_under = false;
wa->colormap = None;
- wa->map_installed = FALSE;
+ wa->map_installed = false;
wa->map_state = IsUnviewable;
wa->all_event_masks = 0;
wa->your_event_mask = 0;
wa->do_not_propagate_mask = 0;
- wa->override_redirect = TRUE;
+ wa->override_redirect = true;
wa->screen = NULL;
}
@@ -1199,9 +1199,9 @@ CompWindow::sendConfigureNotify ()
xev.border_width = attrib.border_width;
xev.above = (prev) ? prev->priv->id : None;
- xev.override_redirect = TRUE;
+ xev.override_redirect = true;
- XSendEvent (screen->dpy (), priv->id, FALSE,
+ XSendEvent (screen->dpy (), priv->id, false,
StructureNotifyMask, (XEvent *) &xev);
}
@@ -1218,7 +1218,7 @@ CompWindow::sendConfigureNotify ()
xev.above = (prev) ? prev->priv->id : None;
xev.override_redirect = priv->attrib.override_redirect;
- XSendEvent (screen->dpy (), priv->id, FALSE,
+ XSendEvent (screen->dpy (), priv->id, false,
StructureNotifyMask, (XEvent *) &xev);
}
}
@@ -1442,7 +1442,7 @@ PrivateWindow::initializeSyncCounter ()
result = XGetWindowProperty (screen->dpy (), id,
Atoms::wmSyncRequestCounter,
- 0L, 1L, FALSE, XA_CARDINAL, &actual, &format,
+ 0L, 1L, false, XA_CARDINAL, &actual, &format,
&n, &left, &data);
if (result == Success && n && data)
@@ -1460,7 +1460,7 @@ PrivateWindow::initializeSyncCounter ()
syncValueIncrement (&syncValue);
- values.events = TRUE;
+ values.events = true;
values.trigger.counter = syncCounter;
values.trigger.wait_value = syncValue;
@@ -1470,13 +1470,13 @@ PrivateWindow::initializeSyncCounter ()
XSyncIntToValue (&values.delta, 1);
- values.events = TRUE;
+ values.events = true;
CompScreen::checkForError (screen->dpy ());
/* Note that by default, the alarm increments the trigger value
* when it fires until the condition (counter.value < trigger.value)
- * is FALSE again.
+ * is false again.
*/
syncAlarm = XSyncCreateAlarm (screen->dpy (),
XSyncCACounter |
@@ -1524,7 +1524,7 @@ CompWindow::sendSyncRequest ()
syncValueIncrement (&priv->syncValue);
- XSendEvent (screen->dpy (), priv->id, FALSE, 0, (XEvent *) &xev);
+ XSendEvent (screen->dpy (), priv->id, false, 0, (XEvent *) &xev);
priv->syncWait = true;
priv->syncGeometry = priv->serverGeometry;
@@ -1842,7 +1842,7 @@ CompWindow::moveInputFocusTo ()
ev.xclient.data.l[3] = 0;
ev.xclient.data.l[4] = 0;
- XSendEvent (s->dpy (), priv->id, FALSE, NoEventMask, &ev);
+ XSendEvent (s->dpy (), priv->id, false, NoEventMask, &ev);
setFocus = true;
}
@@ -1974,7 +1974,7 @@ PrivateWindow::avoidStackingRelativeTo (CompWindow *w)
/* goes through the stack, top-down until we find a window we should
stack above, normal windows can be stacked above fullscreen windows
- (and fullscreen windows over others in their layer) if aboveFs is TRUE. */
+ (and fullscreen windows over others in their layer) if aboveFs is true. */
CompWindow *
PrivateWindow::findSiblingBelow (CompWindow *w,
bool aboveFs)
@@ -2737,7 +2737,7 @@ CompWindow::moveResize (XWindowChanges *xwc,
int gravity,
unsigned int source)
{
- Bool placed = xwcm & (CWX | CWY);
+ bool placed = xwcm & (CWX | CWY);
xwcm &= (CWX | CWY | CWWidth | CWHeight | CWBorderWidth);
@@ -3459,7 +3459,7 @@ PrivateWindow::hide ()
void
PrivateWindow::show ()
{
- Bool onDesktop = window->onCurrentDesktop ();
+ bool onDesktop = window->onCurrentDesktop ();
if (!managed)
return;
@@ -3912,7 +3912,7 @@ CompWindow::getIcon (int width,
unsigned char *data;
result = XGetWindowProperty (screen->dpy (), priv->id, Atoms::wmIcon,
- 0L, 65536L, FALSE, XA_CARDINAL,
+ 0L, 65536L, false, XA_CARDINAL,
&actual, &format, &n, &left, &data);
if (result == Success && data)
@@ -4708,7 +4708,7 @@ PrivateWindow::updateStartupId ()
x = window->geometry ().x () + (svp.x () - vp.x ()) * size.width ();
y = window->geometry ().y () + (svp.y () - vp.y ()) * size.height ();
- window->moveToViewportPosition (x, y, TRUE);
+ window->moveToViewportPosition (x, y, true);
if (allowWindowFocus (0, timestamp))
window->activate ();
@@ -4776,7 +4776,7 @@ CompWindow::CompWindow (Window id,
priv->id = id;
- XGrabButton (screen->dpy (), AnyButton, AnyModifier, priv->id, TRUE,
+ XGrabButton (screen->dpy (), AnyButton, AnyModifier, priv->id, true,
ButtonPressMask | ButtonReleaseMask | ButtonMotionMask,
GrabModeSync, GrabModeSync, None, None);
@@ -5268,7 +5268,7 @@ PrivateWindow::reparent ()
if (frame)
return false;
- XSync (dpy, FALSE);
+ XSync (dpy, false);
if (XCheckTypedWindowEvent (dpy, id, DestroyNotify, &e))
{
@@ -5282,7 +5282,7 @@ PrivateWindow::reparent ()
attr.border_pixel = 0;
mask |= CWBorderPixel;
attr.colormap = attrib.colormap;
- attr.override_redirect = FALSE;
+ attr.override_redirect = false;
attr.event_mask = SubstructureRedirectMask | StructureNotifyMask |
SubstructureNotifyMask | EnterWindowMask |
LeaveWindowMask;
@@ -5303,7 +5303,7 @@ PrivateWindow::reparent ()
attr.do_not_propagate_mask = ButtonPressMask | ButtonReleaseMask |
ButtonMotionMask;
- XGrabButton (dpy, AnyButton, AnyModifier, frame, TRUE,
+ XGrabButton (dpy, AnyButton, AnyModifier, frame, true,
ButtonPressMask | ButtonReleaseMask | ButtonMotionMask,
GrabModeSync, GrabModeSync, None, None);
@@ -5323,7 +5323,7 @@ PrivateWindow::reparent ()
if (mapNum || shaded)
{
XMapWindow (dpy, frame);
- XSync (dpy, FALSE);
+ XSync (dpy, false);
if (XCheckTypedWindowEvent (dpy, id, FocusIn, &e) ||
screen->activeWindow () == id)
{
@@ -5349,7 +5349,7 @@ PrivateWindow::unreparent ()
if (!frame)
return;
- XSync (dpy, FALSE);
+ XSync (dpy, false);
if (XCheckTypedWindowEvent (dpy, id, DestroyNotify, &e))
{