[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#753596: x11-apps: xclock -render doesn't retain clock aspect ratio



Package: x11-apps
Version: 7.7+2
Severity: normal
Tags: upstream patch

xclock looks different depending on -render setting.
When render extension is active, xclock does not keep aspect
ratio of clock.

This bug was already filed to upstream years ago
https://bugs.freedesktop.org/show_bug.cgi?id=3110

A simple patch is proposed to fix this.

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (192, 'unstable')
Architecture: i386 (x86_64)

Kernel: Linux 3.14-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to ru_RU.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages x11-apps depends on:
ii  cpp          4:4.9.0-4
ii  libc6        2.19-4
ii  libpng12-0   1.2.50-1
ii  libsm6       2:1.2.1-2
ii  libx11-6     2:1.6.2-2
ii  libxaw7      2:1.0.12-1
ii  libxcursor1  1:1.1.14-1
ii  libxext6     2:1.3.2-1
ii  libxft2      2.3.1-2
ii  libxkbfile1  1:1.0.8-1
ii  libxmu6      2:1.1.2-1
ii  libxmuu1     2:1.1.2-1
ii  libxrender1  1:0.9.8-1
ii  libxt6       1:1.1.4-1

Versions of packages x11-apps recommends:
ii  xbitmaps  1.1.1-2

Versions of packages x11-apps suggests:
ii  mesa-utils  8.1.0-2+b1

-- no debconf information
--- a/xclock/Clock.c
+++ b/xclock/Clock.c
@@ -1204,8 +1204,8 @@
         w->clock.centerY = w->core.height / 2;
     }
 #ifdef XRENDER
-    w->clock.x_scale = 0.45 * w->core.width;
-    w->clock.y_scale = 0.45 * w->core.height;
+    w->clock.x_scale = 0.45 * min(w->core.width, w->core.height);
+    w->clock.y_scale = 0.45 * min(w->core.width, w->core.height);
     w->clock.x_off = 0.5 * w->core.width;
     w->clock.y_off = 0.5 * w->core.height;
     if (w->clock.pixmap)

Reply to: