Nux

Merge lp:~linaro-graphics-wg/nux/nux-gles2 into lp:nux/2.0

Proposed by Travis Watkins
Status: Merged
Merged at revision: 515
Proposed branch: lp:~linaro-graphics-wg/nux/nux-gles2
Merge into: lp:nux/2.0
Diff against target: 77 lines (+16/-6)
3 files modified
Nux/nux.pc.in (+1/-1)
NuxGraphics/XInputWindow.cpp (+14/-4)
NuxGraphics/nux-graphics.pc.in (+1/-1)
To merge this branch: bzr merge lp:~linaro-graphics-wg/nux/nux-gles2
Reviewer Review Type Date Requested Status
Jay Taoko (community) Approve
Review via email: mp+81034@code.launchpad.net

Description of the change

This is just a few small cleanups to ensure nux runs correctly on GLES2 targets and can be used as a dependency on them.

* added additional checking around Xinerama screen info lookup to handle cases where Xinerama isn't available
* changed pkg-config files to use @GL_PKGS@ as defined in configure.ac so they have the correct GL-related depdencies based on how nux was built

To post a comment you must log in.
Revision history for this message
Jay Taoko (jaytaoko) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Nux/nux.pc.in'
2--- Nux/nux.pc.in 2011-10-14 16:36:25 +0000
3+++ Nux/nux.pc.in 2011-11-02 15:29:28 +0000
4@@ -8,4 +8,4 @@
5 Version: @VERSION@
6 Libs: -L${libdir} -lnux-@NUX_API_VERSION@
7 Cflags: -I${includedir}/Nux-@NUX_API_VERSION@
8-Requires: glib-2.0 nux-core-@NUX_API_VERSION@ nux-image-@NUX_API_VERSION@ nux-graphics-@NUX_API_VERSION@ gl glu sigc++-2.0 glew glewmx libpcre
9\ No newline at end of file
10+Requires: glib-2.0 nux-core-@NUX_API_VERSION@ nux-image-@NUX_API_VERSION@ nux-graphics-@NUX_API_VERSION@ @GL_PKGS@ sigc++-2.0 libpcre
11
12=== modified file 'NuxGraphics/XInputWindow.cpp'
13--- NuxGraphics/XInputWindow.cpp 2011-10-19 20:32:38 +0000
14+++ NuxGraphics/XInputWindow.cpp 2011-11-02 15:29:28 +0000
15@@ -109,7 +109,7 @@
16 Region total_screen_region = XCreateRegion();
17 Region input_window_region = XCreateRegion();
18 Region intersection = XCreateRegion();
19- XineramaScreenInfo monitor;
20+ XRectangle monitor;
21 XRectangle tmp_rect;
22 int largestWidth = 0, largestHeight = 0;
23 int screenWidth, screenHeight;
24@@ -123,6 +123,13 @@
25
26 XUnionRectWithRegion(&tmp_rect, input_window_region, input_window_region);
27
28+ /* If there is no Xinerama data available just use the geometry we have */
29+ if (!info)
30+ {
31+ monitor = tmp_rect;
32+ n_info = 0;
33+ }
34+
35 for (int i = 0; i < n_info; i++)
36 {
37 tmp_rect.x = info[i].x_org;
38@@ -146,7 +153,10 @@
39 largestWidth = width;
40 largestHeight = height;
41
42- monitor = info[i];
43+ monitor.x = info[i].x_org;
44+ monitor.y = info[i].y_org;
45+ monitor.width = info[i].width;
46+ monitor.height = info[i].height;
47 }
48 }
49
50@@ -165,7 +175,7 @@
51
52 if (geometry_.width > geometry_.height)
53 {
54- if (geometry_.y - monitor.y_org < monitor.height / 2)
55+ if (geometry_.y - monitor.y < monitor.height / 2)
56 {
57 /* top */
58 data[2] = geometry_.y + geometry_.height;
59@@ -182,7 +192,7 @@
60 }
61 else
62 {
63- if (geometry_.x - monitor.x_org < monitor.width / 2)
64+ if (geometry_.x - monitor.x < monitor.width / 2)
65 {
66 /* left */
67 data[0] = geometry_.x + geometry_.width;
68
69=== modified file 'NuxGraphics/nux-graphics.pc.in'
70--- NuxGraphics/nux-graphics.pc.in 2011-10-31 14:47:30 +0000
71+++ NuxGraphics/nux-graphics.pc.in 2011-11-02 15:29:28 +0000
72@@ -9,4 +9,4 @@
73 Libs: -L${libdir} -lnux-graphics-@NUX_API_VERSION@
74 Cflags: -I${includedir}/Nux-@NUX_API_VERSION@
75
76-Requires: glib-2.0 nux-core-@NUX_API_VERSION@ nux-image-@NUX_API_VERSION@ gl glu xxf86vm glew glewmx xinerama libutouch-geis
77+Requires: glib-2.0 nux-core-@NUX_API_VERSION@ nux-image-@NUX_API_VERSION@ @GL_PKGS@ xxf86vm xinerama libutouch-geis

Subscribers

People subscribed via source and target branches