diff options
author | simonb <simonb> | 2006-04-17 14:00:28 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-04-17 14:00:28 (GMT) |
commit | b2105a62c378b013257cd1a79ea5a50b4a90a82f (patch) | |
tree | 09479d8b005501a82d5259ababb860cd642c2232 /util/fbrun/FbRun.cc | |
parent | a211ca912da6e17cfeee8a8fdde9d4eeff7c51a7 (diff) | |
download | fluxbox-b2105a62c378b013257cd1a79ea5a50b4a90a82f.zip fluxbox-b2105a62c378b013257cd1a79ea5a50b4a90a82f.tar.bz2 |
fix fbrun positioning code to use hints properly
Diffstat (limited to 'util/fbrun/FbRun.cc')
-rw-r--r-- | util/fbrun/FbRun.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/util/fbrun/FbRun.cc b/util/fbrun/FbRun.cc index 281b35f..41c7474 100644 --- a/util/fbrun/FbRun.cc +++ b/util/fbrun/FbRun.cc | |||
@@ -215,7 +215,6 @@ void FbRun::setTitle(const string &title) { | |||
215 | 215 | ||
216 | void FbRun::resize(unsigned int width, unsigned int height) { | 216 | void FbRun::resize(unsigned int width, unsigned int height) { |
217 | FbTk::TextBox::resize(width, height); | 217 | FbTk::TextBox::resize(width, height); |
218 | setNoMaximize(); | ||
219 | } | 218 | } |
220 | 219 | ||
221 | void FbRun::redrawLabel() { | 220 | void FbRun::redrawLabel() { |
@@ -285,7 +284,7 @@ void FbRun::keyPressEvent(XKeyEvent &ke) { | |||
285 | clear(); | 284 | clear(); |
286 | } | 285 | } |
287 | 286 | ||
288 | void FbRun::setNoMaximize() { | 287 | void FbRun::lockPosition(bool size_too) { |
289 | // we don't need to maximize this window | 288 | // we don't need to maximize this window |
290 | XSizeHints sh; | 289 | XSizeHints sh; |
291 | sh.flags = PMaxSize | PMinSize; | 290 | sh.flags = PMaxSize | PMinSize; |
@@ -293,6 +292,11 @@ void FbRun::setNoMaximize() { | |||
293 | sh.max_height = height(); | 292 | sh.max_height = height(); |
294 | sh.min_width = width(); | 293 | sh.min_width = width(); |
295 | sh.min_height = height(); | 294 | sh.min_height = height(); |
295 | if (size_too) { | ||
296 | sh.flags |= USPosition; | ||
297 | sh.x = x(); | ||
298 | sh.y = y(); | ||
299 | } | ||
296 | XSetWMNormalHints(m_display, window(), &sh); | 300 | XSetWMNormalHints(m_display, window(), &sh); |
297 | } | 301 | } |
298 | 302 | ||