diff options
Diffstat (limited to 'xorg-server/hw/dmx/config')
-rw-r--r-- | xorg-server/hw/dmx/config/xdmxconfig.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xorg-server/hw/dmx/config/xdmxconfig.c b/xorg-server/hw/dmx/config/xdmxconfig.c index 2b7b9683b..0540d0173 100644 --- a/xorg-server/hw/dmx/config/xdmxconfig.c +++ b/xorg-server/hw/dmx/config/xdmxconfig.c @@ -303,7 +303,6 @@ dmxConfigCanvasUpdate(void) fs = XQueryFont(dpy, gcontext); for (pt = dmxConfigCurrent->subentry; pt; pt = pt->next) { int x, y, len; - int xo = 3, yo = fs->ascent + fs->descent + 2; GC gc; if (pt->type != dmxConfigDisplay) @@ -321,6 +320,8 @@ dmxConfigCanvasUpdate(void) y = dmxConfigWidgetHeight - 1; XDrawRectangle(dpy, win, gc, x, y, w, h); if (fs && len) { + int xo = 3, yo = fs->ascent + fs->descent + 2; + while (len && XTextWidth(fs, pt->display->name, len) >= w - 2 * xo) --len; if (len) |