aboutsummaryrefslogtreecommitdiff
path: root/util/fbrun/FbRun.cc
diff options
context:
space:
mode:
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