aboutsummaryrefslogtreecommitdiff
path: root/util/fbrun/FbRun.cc
diff options
context:
space:
mode:
authorsimonb <simonb>2006-04-17 14:00:28 (GMT)
committersimonb <simonb>2006-04-17 14:00:28 (GMT)
commitb2105a62c378b013257cd1a79ea5a50b4a90a82f (patch)
tree09479d8b005501a82d5259ababb860cd642c2232 /util/fbrun/FbRun.cc
parenta211ca912da6e17cfeee8a8fdde9d4eeff7c51a7 (diff)
downloadfluxbox-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.cc8
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
216void FbRun::resize(unsigned int width, unsigned int height) { 216void 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
221void FbRun::redrawLabel() { 220void FbRun::redrawLabel() {
@@ -285,7 +284,7 @@ void FbRun::keyPressEvent(XKeyEvent &ke) {
285 clear(); 284 clear();
286} 285}
287 286
288void FbRun::setNoMaximize() { 287void 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