Merge lp:~bregma/geis/lp-883470 into lp:geis

Proposed by Stephen M. Webb
Status: Merged
Merged at revision: 174
Proposed branch: lp:~bregma/geis/lp-883470
Merge into: lp:geis
Diff against target: 28 lines (+3/-1)
1 file modified
libutouch-geis/geis.c (+3/-1)
To merge this branch: bzr merge lp:~bregma/geis/lp-883470
Reviewer Review Type Date Requested Status
Chase Douglas (community) Approve
Jussi Pakkanen (community) Approve
Review via email: mp+80835@code.launchpad.net

Description of the change

GEIS bck end selection falls back from DBus client to XCB only when the default back end selection is used (not when the DBus client back end is explicitly selected).

To post a comment you must log in.
Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

There was a discussion on the mailing list that you should not use booleans in functions, but rather state enums.

If we are sticking with the boolean, I would call it backend_use_fallback (or use_backend_fallback) to make its intent more clear.

review: Needs Fixing
Revision history for this message
Stephen M. Webb (bregma) wrote :

This internal state variable is never used as a parameter or passed as an argument, so the rule about not using booleans in functions does not apply here.

I certainly have no problem with changing the variable name. Updated the merge request with a new revision to that effect.

lp:~bregma/geis/lp-883470 updated
175. By Stephen M. Webb

Renamed new variable after code review request.

Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

Looks fine.

review: Approve
Revision history for this message
Chase Douglas (chasedouglas) wrote :

Looks good here too.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libutouch-geis/geis.c'
2--- libutouch-geis/geis.c 2011-10-21 22:41:57 +0000
3+++ libutouch-geis/geis.c 2011-10-31 22:33:23 +0000
4@@ -70,6 +70,7 @@
5 GeisBackendMultiplexor backend_multiplexor;
6 GeisBackend backend;
7 GeisBoolean backend_pending;
8+ GeisBoolean backend_use_fallback;
9 GeisDBusServer server; /* @TODO: replace me */
10 GeisEventQueue input_event_queue;
11 int input_event_signal_pipe[2];
12@@ -234,7 +235,7 @@
13 break;
14
15 case GEIS_EVENT_ERROR:
16- if (geis->backend_pending)
17+ if (geis->backend_pending && geis->backend_use_fallback)
18 {
19 if (geis->backend)
20 geis_backend_delete(geis->backend);
21@@ -565,6 +566,7 @@
22 geis_warning("back end not specified, defaulting to DBus");
23 geis->backend = geis_backend_by_name(geis, GEIS_INIT_UTOUCH_DBUS_BACKEND);
24 geis->backend_pending = GEIS_TRUE;
25+ geis->backend_use_fallback = GEIS_TRUE;
26 }
27 if (!geis->backend)
28 {

Subscribers

People subscribed via source and target branches