diff options
author | fluxgen <fluxgen> | 2007-10-18 17:37:46 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2007-10-18 17:37:46 (GMT) |
commit | c7d4438d91929d6d22096abee708347bcaafa552 (patch) | |
tree | 3798af414b254fa61df31693dedcb936bc07ecc0 | |
parent | 72130f350ef08c6200d18e544b861940cbcb7526 (diff) | |
download | fluxbox-c7d4438d91929d6d22096abee708347bcaafa552.zip fluxbox-c7d4438d91929d6d22096abee708347bcaafa552.tar.bz2 |
fixed bug #1809786
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/FbTk/TextBox.cc | 5 |
2 files changed, 8 insertions, 1 deletions
@@ -1,5 +1,9 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 1.0.1: | 2 | Changes for 1.0.1: |
3 | *07/10/18: | ||
4 | * Fixed gcc 2.96 compile problem ( Thanks rumpole at hotmail ) | ||
5 | bug #1809786 | ||
6 | src/FbTk/TextBox.cc | ||
3 | *07/10/15: | 7 | *07/10/15: |
4 | * Added OnWindow modifier to keys file (Mark) | 8 | * Added OnWindow modifier to keys file (Mark) |
5 | Keys.cc Window.cc Screen.cc CurrentWindowCmd.cc | 9 | Keys.cc Window.cc Screen.cc CurrentWindowCmd.cc |
diff --git a/src/FbTk/TextBox.cc b/src/FbTk/TextBox.cc index fa1600e..1c345c9 100644 --- a/src/FbTk/TextBox.cc +++ b/src/FbTk/TextBox.cc | |||
@@ -203,7 +203,10 @@ void TextBox::buttonPressEvent(XButtonEvent &event) { | |||
203 | int delta = width(); | 203 | int delta = width(); |
204 | int tmp = 0; | 204 | int tmp = 0; |
205 | for(i = m_start_pos; i <= m_end_pos; i++) { | 205 | for(i = m_start_pos; i <= m_end_pos; i++) { |
206 | tmp = abs(event.x - font().textWidth(m_text.c_str() + m_start_pos, i - m_start_pos)); | 206 | tmp = abs(static_cast<int> |
207 | (event.x - font(). | ||
208 | textWidth(m_text.c_str() + m_start_pos, | ||
209 | i - m_start_pos))); | ||
207 | 210 | ||
208 | if (tmp < delta) { | 211 | if (tmp < delta) { |
209 | delta = tmp; | 212 | delta = tmp; |