From 98c10a02c5b77e023471ad6993dc66b013889cfb Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Tue, 22 Sep 2015 15:51:52 +0300 Subject: 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 Reviewed-by: Laszlo Agocs --- src/plugins/platforms/xcb/qxcbwindow.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/plugins/platforms/xcb/qxcbwindow.cpp') diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index d751c6d48a..6575149d86 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -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; -- cgit v1.2.3