summaryrefslogtreecommitdiff
path: root/src
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 /src
parent7fff3541afc6595dd7f64ef7abeb587c254b4b41 (diff)
downloadunity-window-decorator-1539fce79cc73bb31732cd3f2ad02be0d7b52821.tar.gz
unity-window-decorator-1539fce79cc73bb31732cd3f2ad02be0d7b52821.tar.bz2
Convert Bool -> bool, TRUE -> true, FALSE -> false.
Diffstat (limited to 'src')
-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
6 files changed, 67 insertions, 67 deletions
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))
{