xcb: Show buttons on the title bar for QWindow
QWindow by default doesn't have the window flags to display buttons on the title bar and it's up to the window manager whether they will be shown. For example, fluxbox doesn't show the maximize button. The cocoa plugin and the windows plugin adjust the window flags in this special case of QWindow to show some buttons, so do the same in the xcb plugin. Change-Id: Idc2575cfeaced524dd67eb5ba99126663626e2b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit is contained in:
parent
58bed4cda9
commit
98c10a02c5
@ -1112,6 +1112,9 @@ void QXcbWindow::setMotifWindowFlags(Qt::WindowFlags flags)
|
||||
mwmhints.flags |= MWM_HINTS_DECORATIONS;
|
||||
|
||||
bool customize = flags & Qt::CustomizeWindowHint;
|
||||
if (type == Qt::Window && !customize)
|
||||
flags |= Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint;
|
||||
|
||||
if (!(flags & Qt::FramelessWindowHint) && !(customize && !(flags & Qt::WindowTitleHint))) {
|
||||
mwmhints.decorations |= MWM_DECOR_BORDER;
|
||||
mwmhints.decorations |= MWM_DECOR_RESIZEH;
|
||||
|
Loading…
Reference in New Issue
Block a user