• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A generic touchscreen calibration program for X.Org


Commit MetaInfo

Révision6e5a9b64e9733193ab094357e947c749efa31fd6 (tree)
l'heure2012-07-05 16:58:37
AuteurTias Guns <tias@ulys...>
CommiterTias Guns

Message de Log

Revert "take rotation into account when calculating display size"

This reverts commit 0aabb155d351656bbb804619279dd497b06c48b0.

Change Summary

Modification

--- a/src/gui/x11.cpp
+++ b/src/gui/x11.cpp
@@ -95,12 +95,7 @@ GuiCalibratorX11::GuiCalibratorX11(Calibrator* calibrator0)
9595 int nsizes;
9696 XRRScreenSize* randrsize = XRRSizes(display, screen_num, &nsizes);
9797 if (nsizes != 0) {
98- Rotation current = 0;
99- XRRRotations(display, screen_num, &current);
100- bool rot = current & RR_Rotate_90 || current & RR_Rotate_270;
101- int width = rot ? randrsize->height : randrsize->width;
102- int height = rot ? randrsize->width : randrsize->height;
103- set_display_size(width, height);
98+ set_display_size(randrsize->width, randrsize->height);
10499 } else {
105100 set_display_size(DisplayWidth(display, screen_num),
106101 DisplayHeight(display, screen_num));
@@ -188,31 +183,17 @@ void GuiCalibratorX11::set_display_size(int width, int height) {
188183
189184 void GuiCalibratorX11::redraw()
190185 {
191- if (calibrator->get_geometry() == NULL) {
192- int width;
193- int height;
194186 #ifdef HAVE_X11_XRANDR
187+ if (calibrator->get_geometry() == NULL) {
195188 // check that screensize did not change
196189 int nsizes;
197190 XRRScreenSize* randrsize = XRRSizes(display, screen_num, &nsizes);
198- if (nsizes != 0) {
199- Rotation current = 0;
200- XRRRotations(display, screen_num, &current);
201- bool rot = current & RR_Rotate_90 || current & RR_Rotate_270;
202- width = rot ? randrsize->height : randrsize->width;
203- height = rot ? randrsize->width : randrsize->height;
204- } else {
205- width = DisplayWidth(display, screen_num);
206- height = DisplayHeight(display, screen_num);
207- }
208-#else
209- width = DisplayWidth(display, screen_num);
210- height = DisplayHeight(display, screen_num);
211-#endif
212- if (display_width != width || display_height != height) {
213- set_display_size(width, height);
191+ if (nsizes != 0 && (display_width != randrsize->width ||
192+ display_height != randrsize->height)) {
193+ set_display_size(randrsize->width, randrsize->height);
214194 }
215195 }
196+#endif
216197
217198 // Print the text
218199 int text_height = font_info->ascent + font_info->descent;