summaryrefslogtreecommitdiff
path: root/wm/fluxbox/patches/patch-bc
blob: 8be04449956c0d73817fa4b7924c70c361d00061 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$NetBSD: patch-bc,v 1.1 2007/11/01 13:08:05 rillig Exp $

sunpro doesn't know whether it should call abs(int) or abs(long), so we
need to make it explicit.

--- src/FbTk/TextBox.cc.orig	2007-03-19 20:57:07.000000000 +0100
+++ src/FbTk/TextBox.cc	2007-10-30 16:57:31.306492000 +0100
@@ -193,7 +193,7 @@ void TextBox::buttonPressEvent(XButtonEv
         int delta = width();
         int tmp = 0;
         for(i = m_start_pos; i <= m_end_pos; i++) {
-            tmp = abs(event.x - font().textWidth(m_text.c_str() + m_start_pos, i - m_start_pos));
+            tmp = abs((int)(event.x - font().textWidth(m_text.c_str() + m_start_pos, i - m_start_pos)));
 
             if (tmp < delta) {
                 delta = tmp;