summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qguiapplication.cpp9
-rw-r--r--src/gui/kernel/qkeysequence.cpp5
-rw-r--r--src/gui/kernel/qplatformwindow_p.h12
-rw-r--r--src/gui/kernel/qwindow.cpp6
4 files changed, 25 insertions, 7 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 098d0331327..518843ffcbd 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -3407,6 +3407,15 @@ void QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::E
return;
QWindowPrivate *p = qt_window_private(window);
+ if (e->isExposed) {
+ // If the window has been automatically positioned or resized by the
+ // window manager, we now assume those have taken effect, even for
+ // asynchronous window managers. From this point on we want the window
+ // to keep its geometry, even when recreated.
+ p->positionAutomatic = false;
+ p->resizeAutomatic = false;
+ }
+
if (!p->receivedExpose) {
if (p->resizeEventPending) {
// as a convenience for plugins, send a resize event before the first expose event if they haven't done so
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index c7b6e4ebff3..bb71f8fb6fc 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -1298,7 +1298,10 @@ QString QKeySequencePrivate::keyName(Qt::Key key, QKeySequence::SequenceFormat f
bool nativeText = (format == QKeySequence::NativeText);
QString p;
- if (key && key < Qt::Key_Escape && key != Qt::Key_Space) {
+ if (nativeText && (key > 0x00 && key <= 0x1f)) {
+ // Map C0 control codes to the corresponding Control Pictures
+ p = QChar::fromUcs2(0x2400 + key);
+ } else if (key && key < Qt::Key_Escape && key != Qt::Key_Space) {
if (!QChar::requiresSurrogates(key)) {
p = QChar::fromUcs2(key).toUpper();
} else {
diff --git a/src/gui/kernel/qplatformwindow_p.h b/src/gui/kernel/qplatformwindow_p.h
index c446ac760c0..24c0fd7c431 100644
--- a/src/gui/kernel/qplatformwindow_p.h
+++ b/src/gui/kernel/qplatformwindow_p.h
@@ -125,6 +125,14 @@ struct Q_GUI_EXPORT QWaylandWindow : public QObject
public:
QT_DECLARE_NATIVE_INTERFACE(QWaylandWindow, 1, QWindow)
+ enum WindowType {
+ Default,
+ ToolTip,
+ ComboBox,
+ Menu,
+ SubMenu,
+ };
+
virtual wl_surface *surface() const = 0;
virtual void setCustomMargins(const QMargins &margins) = 0;
virtual void requestXdgActivationToken(uint serial) = 0;
@@ -136,6 +144,10 @@ public:
return role ? *role : nullptr;
}
virtual void setSessionRestoreId(const QString &role) = 0;
+
+ virtual void setExtendedWindowType(WindowType windowType) = 0;
+ virtual void setParentControlGeometry(const QRect &parentAnchor) = 0;
+
Q_SIGNALS:
void surfaceCreated();
void surfaceDestroyed();
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index c23be8eb3ad..bad5932c457 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -582,12 +582,6 @@ void QWindowPrivate::create(bool recursive)
platformWindow->initialize();
- // Now that the window is created and initialized the platform has had
- // a chance to position and size it automatically. From this point on
- // we want the window to keep its geometry, even when recreated.
- positionAutomatic = false;
- resizeAutomatic = false;
-
QObjectList childObjects = q->children();
for (int i = 0; i < childObjects.size(); i ++) {
QObject *object = childObjects.at(i);