aboutsummaryrefslogtreecommitdiff
path: root/src/TooltipWindow.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2012-08-28 08:51:55 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2012-08-28 08:51:55 (GMT)
commit541c8c407b7ba8dd10f85bb48bcb5900270b3f84 (patch)
tree71a6abc0f2a43bcfd33f80b3b30b878f234cbf05 /src/TooltipWindow.cc
parent60a53113e05db443af4d520883ec3145680642a8 (diff)
downloadfluxbox-541c8c407b7ba8dd10f85bb48bcb5900270b3f84.zip
fluxbox-541c8c407b7ba8dd10f85bb48bcb5900270b3f84.tar.bz2
changed timing functions to use a monotonic increasing clock
gettimeofday() is subject to be changed on daylight-saving or to ntp-related (think leap-seconds). even worse, it is subject to be changed BACK in time. this is hard to fix correctly (see commit 45726d3016e and bug #3560509). it is irrelevant for timers to know the nano-seconds since the epoch anyways.
Diffstat (limited to 'src/TooltipWindow.cc')
-rw-r--r--src/TooltipWindow.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/TooltipWindow.cc b/src/TooltipWindow.cc
index 0fb7273..77a6e1e 100644
--- a/src/TooltipWindow.cc
+++ b/src/TooltipWindow.cc
@@ -55,8 +55,11 @@ void TooltipWindow::raiseTooltip() {
55 55
56 resize(m_lastText); 56 resize(m_lastText);
57 reconfigTheme(); 57 reconfigTheme();
58 int h = theme()->iconbarTheme().text().font().height() + theme()->bevelWidth() * 2; 58
59 int w = theme()->iconbarTheme().text().font().textWidth(m_lastText) + theme()->bevelWidth() * 2; 59 FbTk::Font& font = theme()->iconbarTheme().text().font();
60
61 int h = font.height() + theme()->bevelWidth() * 2;
62 int w = font.textWidth(m_lastText) + theme()->bevelWidth() * 2;
60 63
61 Window root_ret; // not used 64 Window root_ret; // not used
62 Window window_ret; // not used 65 Window window_ret; // not used
@@ -91,11 +94,11 @@ void TooltipWindow::raiseTooltip() {
91 show(); 94 show();
92 clear(); 95 clear();
93 // TODO: make this use a TextButton like TextDialog does 96 // TODO: make this use a TextButton like TextDialog does
94 theme()->iconbarTheme().text().font().drawText(*this, screen().screenNumber(), 97 font.drawText(*this, screen().screenNumber(),
95 theme()->iconbarTheme().text().textGC(), 98 theme()->iconbarTheme().text().textGC(),
96 m_lastText, 99 m_lastText,
97 theme()->bevelWidth(), 100 theme()->bevelWidth(),
98 theme()->bevelWidth() + theme()->iconbarTheme().text().font().ascent()); 101 theme()->bevelWidth() + font.ascent());
99} 102}
100 103
101void TooltipWindow::updateText(const FbTk::BiDiString& text) { 104void TooltipWindow::updateText(const FbTk::BiDiString& text) {