Merge lp:~vanvugt/unity/fix-1036095 into lp:unity

Proposed by Daniel van Vugt
Status: Merged
Approved by: Andrea Azzarone
Approved revision: no longer in the source branch.
Merged at revision: 2549
Proposed branch: lp:~vanvugt/unity/fix-1036095
Merge into: lp:unity
Diff against target: 24 lines (+2/-1)
2 files modified
CMakeLists.txt (+1/-1)
launcher/Launcher.h (+1/-0)
To merge this branch: bzr merge lp:~vanvugt/unity/fix-1036095
Reviewer Review Type Date Requested Status
Michal Hruby (community) Needs Fixing
Sam Spilsbury (community) Approve
Andrea Azzarone (community) Approve
Review via email: mp+119317@code.launchpad.net

Commit message

Detect required package "libgeis", rather than waiting for cryptic build
failures. (LP: #1036095)

Description of the change

Detect required package "libgeis", rather than waiting for cryptic build
failures. (LP: #1036095)

Also include the header for nux::GestureEvent. A missing file is much nicer than inexplicable undefined types.

To post a comment you must log in.
Revision history for this message
Andrea Azzarone (azzar1) wrote :

+#include <NuxGraphics/GestureEvent.h>

Why have you added this line? Nux/View.h uses a forward declaration for it IIRC.

review: Needs Information
Revision history for this message
Sam Spilsbury (smspillaz) :
review: Approve
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

> +#include <NuxGraphics/GestureEvent.h>
>
> Why have you added this line? Nux/View.h uses a forward declaration for it
> IIRC.

Whoops, approved the whole branch just before you added your comment. Put it back to needs review ... lets hope the automerger doesn't see it.

I think he's got this so that you'll immediately know if you're missing support for it, though it should probably go inside of the files that use it and not the header itself.

review: Needs Fixing
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

andyrock: No, GestureEvent.h can be missing and never installed if you built Nux but forgot to install libgeis-dev first. So it's a useful check to ensure NuxGraphics/GestureEvent.h exists.

More generally you should always include the headers that define the types used in the current file.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

nux::GestureEvent is referred to in Launcher.h. Therefore GestureEvent.h should be included by Launcher.h

Revision history for this message
Andrea Azzarone (azzar1) wrote :

I prefer to use forward declaration as much as possible. Approve btw ;)

review: Approve
Revision history for this message
Sam Spilsbury (smspillaz) :
review: Approve
Revision history for this message
Michal Hruby (mhr3) wrote :

Why don't we check the macro in nux that's defined when nux actually has gesture support? This makes unity unnecessarily compile and link against geis :/

review: Needs Fixing
Revision history for this message
Michal Hruby (mhr3) wrote :

Not to mention that it doesn't really fix the issue...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2012-08-10 09:34:26 +0000
3+++ CMakeLists.txt 2012-08-13 09:46:25 +0000
4@@ -134,7 +134,7 @@
5 # Compiz Plugins
6 #
7
8-set (UNITY_PLUGIN_DEPS "compiz;nux-3.0>=3.0.0;libbamf3;dee-1.0;gio-2.0;gio-unix-2.0;dbusmenu-glib-0.4;x11;libstartup-notification-1.0;gthread-2.0;indicator3-0.4>=0.4.90;atk;unity-misc>=0.4.0;gconf-2.0;gtk+-3.0>=3.1;sigc++-2.0;json-glib-1.0;libnotify;xfixes;unity-protocol-private>=5.93.1")
9+set (UNITY_PLUGIN_DEPS "compiz;nux-3.0>=3.0.0;libbamf3;dee-1.0;gio-2.0;gio-unix-2.0;dbusmenu-glib-0.4;x11;libstartup-notification-1.0;gthread-2.0;indicator3-0.4>=0.4.90;atk;unity-misc>=0.4.0;gconf-2.0;gtk+-3.0>=3.1;sigc++-2.0;json-glib-1.0;libnotify;xfixes;unity-protocol-private>=5.93.1;libgeis")
10 # FIXME: unity-protocol-private shouldn't be there, but building of unityshell is just broken
11 set (UNITY_PROTOCOL_PRIVATE_DEPS "unity-protocol-private>=5.93.1")
12
13
14=== modified file 'launcher/Launcher.h'
15--- launcher/Launcher.h 2012-08-03 09:39:01 +0000
16+++ launcher/Launcher.h 2012-08-13 09:46:25 +0000
17@@ -24,6 +24,7 @@
18 #include <Nux/View.h>
19 #include <Nux/BaseWindow.h>
20 #include <Nux/TimerProc.h>
21+#include <NuxGraphics/GestureEvent.h>
22 #include <NuxGraphics/IOpenGLAsmShader.h>
23
24 #include "PointerBarrier.h"