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
=== modified file 'Nux/nux.pc.in'
--- Nux/nux.pc.in 2011-10-14 16:36:25 +0000
+++ Nux/nux.pc.in 2011-11-02 15:29:28 +0000
@@ -8,4 +8,4 @@
8Version: @VERSION@8Version: @VERSION@
9Libs: -L${libdir} -lnux-@NUX_API_VERSION@9Libs: -L${libdir} -lnux-@NUX_API_VERSION@
10Cflags: -I${includedir}/Nux-@NUX_API_VERSION@10Cflags: -I${includedir}/Nux-@NUX_API_VERSION@
11Requires: 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
12\ No newline at end of file11\ No newline at end of file
12Requires: glib-2.0 nux-core-@NUX_API_VERSION@ nux-image-@NUX_API_VERSION@ nux-graphics-@NUX_API_VERSION@ @GL_PKGS@ sigc++-2.0 libpcre
1313
=== modified file 'NuxGraphics/XInputWindow.cpp'
--- NuxGraphics/XInputWindow.cpp 2011-10-19 20:32:38 +0000
+++ NuxGraphics/XInputWindow.cpp 2011-11-02 15:29:28 +0000
@@ -109,7 +109,7 @@
109 Region total_screen_region = XCreateRegion();109 Region total_screen_region = XCreateRegion();
110 Region input_window_region = XCreateRegion();110 Region input_window_region = XCreateRegion();
111 Region intersection = XCreateRegion();111 Region intersection = XCreateRegion();
112 XineramaScreenInfo monitor;112 XRectangle monitor;
113 XRectangle tmp_rect;113 XRectangle tmp_rect;
114 int largestWidth = 0, largestHeight = 0;114 int largestWidth = 0, largestHeight = 0;
115 int screenWidth, screenHeight;115 int screenWidth, screenHeight;
@@ -123,6 +123,13 @@
123123
124 XUnionRectWithRegion(&tmp_rect, input_window_region, input_window_region);124 XUnionRectWithRegion(&tmp_rect, input_window_region, input_window_region);
125125
126 /* If there is no Xinerama data available just use the geometry we have */
127 if (!info)
128 {
129 monitor = tmp_rect;
130 n_info = 0;
131 }
132
126 for (int i = 0; i < n_info; i++)133 for (int i = 0; i < n_info; i++)
127 {134 {
128 tmp_rect.x = info[i].x_org;135 tmp_rect.x = info[i].x_org;
@@ -146,7 +153,10 @@
146 largestWidth = width;153 largestWidth = width;
147 largestHeight = height;154 largestHeight = height;
148155
149 monitor = info[i];156 monitor.x = info[i].x_org;
157 monitor.y = info[i].y_org;
158 monitor.width = info[i].width;
159 monitor.height = info[i].height;
150 }160 }
151 }161 }
152162
@@ -165,7 +175,7 @@
165175
166 if (geometry_.width > geometry_.height)176 if (geometry_.width > geometry_.height)
167 {177 {
168 if (geometry_.y - monitor.y_org < monitor.height / 2)178 if (geometry_.y - monitor.y < monitor.height / 2)
169 {179 {
170 /* top */180 /* top */
171 data[2] = geometry_.y + geometry_.height;181 data[2] = geometry_.y + geometry_.height;
@@ -182,7 +192,7 @@
182 }192 }
183 else193 else
184 {194 {
185 if (geometry_.x - monitor.x_org < monitor.width / 2)195 if (geometry_.x - monitor.x < monitor.width / 2)
186 {196 {
187 /* left */197 /* left */
188 data[0] = geometry_.x + geometry_.width;198 data[0] = geometry_.x + geometry_.width;
189199
=== modified file 'NuxGraphics/nux-graphics.pc.in'
--- NuxGraphics/nux-graphics.pc.in 2011-10-31 14:47:30 +0000
+++ NuxGraphics/nux-graphics.pc.in 2011-11-02 15:29:28 +0000
@@ -9,4 +9,4 @@
9Libs: -L${libdir} -lnux-graphics-@NUX_API_VERSION@9Libs: -L${libdir} -lnux-graphics-@NUX_API_VERSION@
10Cflags: -I${includedir}/Nux-@NUX_API_VERSION@10Cflags: -I${includedir}/Nux-@NUX_API_VERSION@
1111
12Requires: glib-2.0 nux-core-@NUX_API_VERSION@ nux-image-@NUX_API_VERSION@ gl glu xxf86vm glew glewmx xinerama libutouch-geis12Requires: 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