diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2013-06-27 10:20:51 +0400 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2013-06-27 10:20:51 +0400 |
commit | a596236a6b0f87d51a9e6c97898fe2956a3b6909 (patch) | |
tree | 55e8f1e3b47bd48954bcde2ac45e1e43cc5e4717 /client | |
parent | 78356209a18ad9defb93357f043d9e09030c9467 (diff) |
do not use true for == or !=
Diffstat (limited to 'client')
-rw-r--r-- | client/X11/xf_event.c | 28 | ||||
-rw-r--r-- | client/X11/xf_keyboard.c | 2 | ||||
-rw-r--r-- | client/X11/xf_monitor.c | 4 | ||||
-rw-r--r-- | client/X11/xf_window.c | 9 | ||||
-rw-r--r-- | client/X11/xfreerdp.c | 26 |
5 files changed, 35 insertions, 34 deletions
diff --git a/client/X11/xf_event.c b/client/X11/xf_event.c index b0a6a65..80b7c2c 100644 --- a/client/X11/xf_event.c +++ b/client/X11/xf_event.c @@ -88,7 +88,7 @@ tbool xf_event_Expose(xfInfo* xfi, XEvent* event, tbool app) xfi->instance->SendInvalidate(xfi->instance, -1, x, y, w, h); return true; } - if (app != true) + if (app == false) { XCopyArea(xfi->display, xfi->primary, xfi->window->handle, xfi->gc, x, y, w, h, x, y); } @@ -122,9 +122,9 @@ tbool xf_event_MotionNotify(xfInfo* xfi, XEvent* event, tbool app) input = xfi->instance->input; - if (app != true) + if (app == false) { - if (xfi->mouse_motion != true) + if (xfi->mouse_motion == false) { if ((event->xmotion.state & (Button1Mask | Button2Mask | Button3Mask)) == 0) return true; @@ -135,7 +135,7 @@ tbool xf_event_MotionNotify(xfInfo* xfi, XEvent* event, tbool app) if (xfi->fullscreen) XSetInputFocus(xfi->display, xfi->window->handle, RevertToPointerRoot, CurrentTime); } - else if (xfi->mouse_motion == true) + else if (xfi->mouse_motion != false) { rdpWindow* window; int x = event->xmotion.x; @@ -340,7 +340,7 @@ tbool xf_event_FocusIn(xfInfo* xfi, XEvent* event, tbool app) xfi->focused = true; - if (xfi->mouse_active && (app != true)) + if (xfi->mouse_active && (app == false)) XGrabKeyboard(xfi->display, xfi->window->handle, true, GrabModeAsync, GrabModeAsync, CurrentTime); if (app) @@ -348,7 +348,7 @@ tbool xf_event_FocusIn(xfInfo* xfi, XEvent* event, tbool app) xf_kbd_focus_in(xfi); - if (app != true) + if (app == false) xf_cliprdr_check_owner(xfi); return true; @@ -411,7 +411,7 @@ tbool xf_event_ClientMessage(xfInfo* xfi, XEvent* event, tbool app) tbool xf_event_EnterNotify(xfInfo* xfi, XEvent* event, tbool app) { - if (app != true) + if (app == false) { xfi->mouse_active = true; @@ -442,7 +442,7 @@ tbool xf_event_EnterNotify(xfInfo* xfi, XEvent* event, tbool app) tbool xf_event_LeaveNotify(xfInfo* xfi, XEvent* event, tbool app) { - if (app != true) + if (app == false) { xfi->mouse_active = false; XUngrabKeyboard(xfi->display, CurrentTime); @@ -494,7 +494,7 @@ tbool xf_event_MapNotify(xfInfo* xfi, XEvent* event, tbool app) rdpWindow* window; rdpRail* rail = ((rdpContext*) xfi->context)->rail; - if (app != true) + if (app == false) return true; window = window_list_get_by_extra_id(rail->list, (void*) event->xany.window); @@ -515,7 +515,7 @@ tbool xf_event_UnmapNotify(xfInfo* xfi, XEvent* event, tbool app) rdpWindow* window; rdpRail* rail = ((rdpContext*) xfi->context)->rail; - if (app != true) + if (app == false) return true; window = window_list_get_by_extra_id(rail->list, (void*) event->xany.window); @@ -531,7 +531,7 @@ tbool xf_event_UnmapNotify(xfInfo* xfi, XEvent* event, tbool app) tbool xf_event_SelectionNotify(xfInfo* xfi, XEvent* event, tbool app) { - if (app != true) + if (app == false) { if (xf_cliprdr_process_selection_notify(xfi, event)) return true; @@ -542,7 +542,7 @@ tbool xf_event_SelectionNotify(xfInfo* xfi, XEvent* event, tbool app) tbool xf_event_SelectionRequest(xfInfo* xfi, XEvent* event, tbool app) { - if (app != true) + if (app == false) { if (xf_cliprdr_process_selection_request(xfi, event)) return true; @@ -553,7 +553,7 @@ tbool xf_event_SelectionRequest(xfInfo* xfi, XEvent* event, tbool app) tbool xf_event_SelectionClear(xfInfo* xfi, XEvent* event, tbool app) { - if (app != true) + if (app == false) { if (xf_cliprdr_process_selection_clear(xfi, event)) return true; @@ -564,7 +564,7 @@ tbool xf_event_SelectionClear(xfInfo* xfi, XEvent* event, tbool app) tbool xf_event_PropertyNotify(xfInfo* xfi, XEvent* event, tbool app) { - if (app != true) + if (app == false) { if (xf_cliprdr_process_property_notify(xfi, event)) return true; diff --git a/client/X11/xf_keyboard.c b/client/X11/xf_keyboard.c index 446ab05..7f5c1e7 100644 --- a/client/X11/xf_keyboard.c +++ b/client/X11/xf_keyboard.c @@ -104,7 +104,7 @@ int xf_kbd_read_keyboard_state(xfInfo* xfi) Window wdummy; uint32 state = 0; - if (xfi->remote_app != true) + if (xfi->remote_app == false) { XQueryPointer(xfi->display, xfi->window->handle, &wdummy, &wdummy, &dummy, &dummy, &dummy, &dummy, &state); diff --git a/client/X11/xf_monitor.c b/client/X11/xf_monitor.c index c0022a2..7bbc2e2 100644 --- a/client/X11/xf_monitor.c +++ b/client/X11/xf_monitor.c @@ -43,7 +43,7 @@ tbool xf_detect_monitors(xfInfo* xfi, rdpSettings* settings) vscreen = &xfi->vscreen; - if (xf_GetWorkArea(xfi) != true) + if (xf_GetWorkArea(xfi) == false) { xfi->workArea.x = 0; xfi->workArea.y = 0; @@ -67,7 +67,7 @@ tbool xf_detect_monitors(xfInfo* xfi, rdpSettings* settings) settings->height = (xfi->workArea.height * settings->percent_screen) / 100; } - if (settings->fullscreen != true && settings->workarea != true) + if (settings->fullscreen == false && settings->workarea == false) return true; #ifdef WITH_XINERAMA diff --git a/client/X11/xf_window.c b/client/X11/xf_window.c index cebcda3..bcd9aa2 100644 --- a/client/X11/xf_window.c +++ b/client/X11/xf_window.c @@ -154,7 +154,8 @@ tbool xf_GetCurrentDesktop(xfInfo* xfi) status = xf_GetWindowProperty(xfi, DefaultRootWindow(xfi->display), xfi->_NET_CURRENT_DESKTOP, 1, &nitems, &bytes, &prop); - if (status != true) { + if (status == false) + { return false; } @@ -174,13 +175,13 @@ tbool xf_GetWorkArea(xfInfo* xfi) status = xf_GetCurrentDesktop(xfi); - if (status != true) + if (status == false) return false; status = xf_GetWindowProperty(xfi, DefaultRootWindow(xfi->display), xfi->_NET_WORKAREA, 32 * 4, &nitems, &bytes, &prop); - if (status != true) + if (status == false) return false; if ((xfi->current_desktop * 4 + 3) >= nitems) { @@ -614,7 +615,7 @@ void xf_SetWindowIcon(xfInfo* xfi, xfWindow* window, rdpIcon* icon) long* dstp; uint32* srcp; - if (icon->big != true) + if (icon->big == false) return; pixels = icon->entry->width * icon->entry->height; diff --git a/client/X11/xfreerdp.c b/client/X11/xfreerdp.c index 9af048b..77c72e9 100644 --- a/client/X11/xfreerdp.c +++ b/client/X11/xfreerdp.c @@ -107,9 +107,9 @@ void xf_sw_end_paint(rdpContext* context) xfi = ((xfContext*) context)->xfi; gdi = context->gdi; - if (xfi->remote_app != true) + if (xfi->remote_app == false) { - if (xfi->complex_regions != true) + if (xfi->complex_regions == false) { if (gdi->primary->hdc->hwnd->invalid->null) return; @@ -170,7 +170,7 @@ void xf_sw_desktop_resize(rdpContext* context) xfi = ((xfContext*) context)->xfi; settings = xfi->instance->settings; - if (xfi->fullscreen != true) + if (xfi->fullscreen == false) { rdpGdi* gdi = context->gdi; gdi_resize(gdi, xfi->width, xfi->height); @@ -224,7 +224,7 @@ void xf_hw_desktop_resize(rdpContext* context) xfi = ((xfContext*) context)->xfi; settings = xfi->instance->settings; - if (xfi->fullscreen != true) + if (xfi->fullscreen == false) { xfi->width = settings->width; xfi->height = settings->height; @@ -267,7 +267,7 @@ tbool xf_check_fds(freerdp* instance, fd_set* set) memset(&xevent, 0, sizeof(xevent)); XNextEvent(xfi->display, &xevent); - if (xf_event_process(instance, &xevent) != true) + if (xf_event_process(instance, &xevent) == false) return false; } @@ -617,7 +617,7 @@ tbool xf_post_connect(freerdp* instance) cache = instance->context->cache; channels = xfi->_context->channels; - if (xf_get_pixmap_info(xfi) != true) + if (xf_get_pixmap_info(xfi) == false) return false; xf_register_graphics(instance->context->graphics); @@ -703,7 +703,7 @@ tbool xf_post_connect(freerdp* instance) pointer_cache_register_callbacks(instance->update); - if (xfi->sw_gdi != true) + if (xfi->sw_gdi == false) { glyph_cache_register_callbacks(instance->update); brush_cache_register_callbacks(instance->update); @@ -957,19 +957,19 @@ int xfreerdp_run(freerdp* instance) rcount = 0; wcount = 0; - if (freerdp_get_fds(instance, rfds, &rcount, wfds, &wcount) != true) + if (freerdp_get_fds(instance, rfds, &rcount, wfds, &wcount) == false) { printf("Failed to get FreeRDP file descriptor\n"); ret = XF_EXIT_CONN_FAILED; break; } - if (freerdp_channels_get_fds(channels, instance, rfds, &rcount, wfds, &wcount) != true) + if (freerdp_channels_get_fds(channels, instance, rfds, &rcount, wfds, &wcount) == false) { printf("Failed to get channel manager file descriptor\n"); ret = XF_EXIT_CONN_FAILED; break; } - if (xf_get_fds(instance, rfds, &rcount, wfds, &wcount) != true) + if (xf_get_fds(instance, rfds, &rcount, wfds, &wcount) == false) { printf("Failed to get xfreerdp file descriptor\n"); ret = XF_EXIT_CONN_FAILED; @@ -1014,17 +1014,17 @@ int xfreerdp_run(freerdp* instance) } } - if (freerdp_check_fds(instance) != true) + if (freerdp_check_fds(instance) == false) { printf("Failed to check FreeRDP file descriptor\n"); break; } - if (xf_check_fds(instance, &rfds_set) != true) + if (xf_check_fds(instance, &rfds_set) == false) { printf("Failed to check xfreerdp file descriptor\n"); break; } - if (freerdp_channels_check_fds(channels, instance) != true) + if (freerdp_channels_check_fds(channels, instance) == false) { printf("Failed to check channel manager file descriptor\n"); break; |