Replace TRUE/FALSE with boolean values true/false [2]

X API calls for some reason were missed in previous commits.

Note: Traditionally X Api uses "True" and "False" definitions, but for
consistency with the rest of code base it would be better to use modern
counterparts.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
pull/694/head
Alexander Golubev 1 week ago
parent e2bdf9f279
commit e8fcdbfe90

@ -203,7 +203,7 @@ void KDesktopConfig::save()
info.setNumberOfDesktops(_numInput->value());
info.activate();
XSync(tqt_xdisplay(), FALSE);
XSync(tqt_xdisplay(), false);
int konq_screen_number = 0;
if (tqt_xdisplay())

@ -50,7 +50,7 @@ void KDesktopApp::initCmBackground()
XSelectInput (tqt_xdisplay(), tqt_xrootwin(), PropertyChangeMask);
if (XGetWindowProperty (tqt_xdisplay(), tqt_xrootwin(), m_cmBackground,
0, 1, FALSE, XA_CARDINAL, &type, &format, &num,
0, 1, false, XA_CARDINAL, &type, &format, &num,
&rest, &data) == Success && num)
{
if (type == XA_CARDINAL)
@ -73,7 +73,7 @@ bool KDesktopApp::x11EventFilter (XEvent * xevent)
Bool supported = false;
if (XGetWindowProperty (tqt_xdisplay(), tqt_xrootwin(), m_cmBackground,
0, 1, FALSE, XA_CARDINAL, &type, &format, &num,
0, 1, false, XA_CARDINAL, &type, &format, &num,
&rest, &data) == Success && num)
{
if (type == XA_CARDINAL)

@ -289,7 +289,7 @@ static TQCString getQCStringProperty(WId w, Atom prop)
unsigned char *data = 0;
TQCString result = "";
status = XGetWindowProperty( tqt_xdisplay(), w, prop, 0, 10000,
FALSE, XA_STRING, &type, &format,
false, XA_STRING, &type, &format,
&nitems, &extra, &data );
if ( status == Success) {
if( data )
@ -309,7 +309,7 @@ static TQStringList getQStringListProperty(WId w, Atom prop)
TQStringList result;
status = XGetWindowProperty( tqt_xdisplay(), w, prop, 0, 10000,
FALSE, XA_STRING, &type, &format,
false, XA_STRING, &type, &format,
&nitems, &extra, &data );
if ( status == Success) {
if (!data)
@ -375,7 +375,7 @@ WId KSMServer::windowWmClientLeader(WId w)
unsigned char *data = 0;
Window result = w;
status = XGetWindowProperty( tqt_xdisplay(), w, wm_client_leader, 0, 10000,
FALSE, XA_WINDOW, &type, &format,
false, XA_WINDOW, &type, &format,
&nitems, &extra, &data );
if (status == Success ) {
if (data && nitems > 0)

@ -692,7 +692,7 @@ Time Client::readUserCreationTime() const
unsigned char *data = 0;
KXErrorHandler handler; // ignore errors?
status = XGetWindowProperty( tqt_xdisplay(), window(),
atoms->kde_net_wm_user_creation_time, 0, 10000, FALSE, XA_CARDINAL,
atoms->kde_net_wm_user_creation_time, 0, 10000, false, XA_CARDINAL,
&type, &format, &nitems, &extra, &data );
if (status == Success )
{

@ -103,7 +103,7 @@ Atoms::Atoms()
assert( n <= max );
XInternAtoms( tqt_xdisplay(), names, n, FALSE, atoms_return );
XInternAtoms( tqt_xdisplay(), names, n, false, atoms_return );
for (int i = 0; i < n; i++ )
*atoms[i] = atoms_return[i];
}

@ -795,7 +795,7 @@ void Client::animateMinimizeOrUnminimize( bool minimize )
area2 = area;
}
XFlush(tqt_xdisplay());
XSync( tqt_xdisplay(), FALSE );
XSync( tqt_xdisplay(), false );
diff = t.elapsed();
if (diff > step)
diff = step;
@ -2532,7 +2532,7 @@ Window Client::staticWmClientLeader(WId w)
Window result = w;
XErrorHandler oldHandler = XSetErrorHandler(nullErrorHandler);
status = XGetWindowProperty( tqt_xdisplay(), w, atoms->wm_client_leader, 0, 10000,
FALSE, XA_WINDOW, &type, &format,
false, XA_WINDOW, &type, &format,
&nitems, &extra, &data );
XSetErrorHandler(oldHandler);
if (status == Success )

@ -1021,7 +1021,7 @@ void Client::updateMouseGrab()
if( isActive() && !workspace()->forcedGlobalMouseGrab()) // see Workspace::establishTabBoxGrab()
{
// first grab all modifier combinations
XGrabButton(tqt_xdisplay(), AnyButton, AnyModifier, wrapperId(), FALSE,
XGrabButton(tqt_xdisplay(), AnyButton, AnyModifier, wrapperId(), false,
ButtonPressMask,
GrabModeSync, GrabModeAsync,
None, None );
@ -1042,7 +1042,7 @@ void Client::updateMouseGrab()
{
XUngrabButton( tqt_xdisplay(), AnyButton, AnyModifier, wrapperId());
// simply grab all modifier combinations
XGrabButton(tqt_xdisplay(), AnyButton, AnyModifier, wrapperId(), FALSE,
XGrabButton(tqt_xdisplay(), AnyButton, AnyModifier, wrapperId(), false,
ButtonPressMask,
GrabModeSync, GrabModeAsync,
None, None );

@ -1379,7 +1379,7 @@ void Client::sendSyntheticConfigureNotify()
c.border_width = 0;
c.above = None;
c.override_redirect = 0;
XSendEvent( tqt_xdisplay(), c.event, TRUE, StructureNotifyMask, (XEvent*)&c );
XSendEvent( tqt_xdisplay(), c.event, true, StructureNotifyMask, (XEvent*)&c );
}
const TQPoint Client::calculateGravitation( bool invert, int gravity ) const

@ -1359,7 +1359,7 @@ Client* Workspace::previousStaticClient( Client* c ) const
bool Workspace::establishTabBoxGrab()
{
if( XGrabKeyboard( tqt_xdisplay(), root, FALSE,
if( XGrabKeyboard( tqt_xdisplay(), root, false,
GrabModeAsync, GrabModeAsync, get_tqt_x_time()) != GrabSuccess )
return false;
// Don't try to establish a global mouse grab using XGrabPointer, as that would prevent

@ -90,7 +90,7 @@ void Motif::readFlags( WId w, bool& noborder, bool& resize, bool& move,
unsigned char* data;
MwmHints* hints = 0;
if ( XGetWindowProperty( tqt_xdisplay(), w, atoms->motif_wm_hints, 0, 5,
FALSE, atoms->motif_wm_hints, &type, &format,
false, atoms->motif_wm_hints, &type, &format,
&length, &after, &data ) == Success )
{
if ( data )
@ -196,7 +196,7 @@ TQCString getStringProperty(WId w, Atom prop, char separator)
TQCString result = "";
KXErrorHandler handler; // ignore errors
status = XGetWindowProperty( tqt_xdisplay(), w, prop, 0, 10000,
FALSE, XA_STRING, &type, &format,
false, XA_STRING, &type, &format,
&nitems, &extra, &data );
if ( status == Success)
{

@ -2225,7 +2225,7 @@ unsigned int Workspace::sendFakedMouseEvent( TQPoint pos, WId w, MouseEmulation
e.xmotion.y_root = pos.y();
e.xmotion.state = state;
e.xmotion.is_hint = NotifyNormal;
XSendEvent( tqt_xdisplay(), w, TRUE, ButtonMotionMask, &e );
XSendEvent( tqt_xdisplay(), w, true, ButtonMotionMask, &e );
}
else
{
@ -2241,7 +2241,7 @@ unsigned int Workspace::sendFakedMouseEvent( TQPoint pos, WId w, MouseEmulation
e.xbutton.y_root = pos.y();
e.xbutton.state = state;
e.xbutton.button = button;
XSendEvent( tqt_xdisplay(), w, TRUE, ButtonPressMask, &e );
XSendEvent( tqt_xdisplay(), w, true, ButtonPressMask, &e );
if ( type == EmuPress )
{

Loading…
Cancel
Save