Guest User

Untitled

a guest
Feb 20th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.95 KB | None | 0 0
  1. diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
  2. index 5ece7d6..ab83d33 100644
  3. --- a/src/gui/kernel/qwidget_x11.cpp
  4. +++ b/src/gui/kernel/qwidget_x11.cpp
  5. @@ -2691,8 +2691,16 @@ void QWidgetPrivate::setConstraints_sys()
  6.  #ifdef ALIEN_DEBUG
  7.      qDebug() << "QWidgetPrivate::setConstraints_sys START" << q;
  8.  #endif
  9. -    if (q->testAttribute(Qt::WA_WState_Created))
  10. +    if (q->testAttribute(Qt::WA_WState_Created)) {
  11.          do_size_hints(q, extra);
  12. +        QtMWMHints mwmHints = GetMWMHints(X11->display, q->internalWinId());
  13. +        if (q->minimumSize() == q->maximumSize()) {
  14. +            mwmHints.functions &= ~MWM_FUNC_RESIZE;
  15. +        } else {
  16. +            mwmHints.functions |= MWM_FUNC_RESIZE;            
  17. +        }
  18. +        SetMWMHints(X11->display, q->internalWinId(), mwmHints);        
  19. +    }
  20.  #ifdef ALIEN_DEBUG
  21.      qDebug() << "QWidgetPrivate::setConstraints_sys END" << q;
  22.  #endif
Add Comment
Please, Sign In to add comment