Commit c0d72b06 authored by Martin Flöser's avatar Martin Flöser
Browse files

Delay maximize operation by one event cycle

The result of maximizing a window might be the decoration
going away. Because of that we need to delay the handling of
maximize and title bar double click by one cycle as had been
done for other close operations in 0fea5325

BUG: 304870
FIXED-IN: 4.9.1
REVIEW: 105961
parent 9306d64a
......@@ -455,6 +455,34 @@ void AuroraeClient::doCloseWindow()
KDecorationUnstable::closeWindow();
}
void AuroraeClient::maximize(int button)
{
// a maximized window does not need to have a window decoration
// in that case we need to delay handling by one cycle
// BUG: 304870
QMetaObject::invokeMethod(qobject_cast< KDecorationUnstable* >(this),
"doMaximzie",
Qt::QueuedConnection,
Q_ARG(int, button));
}
void AuroraeClient::doMaximzie(int button)
{
KDecorationUnstable::maximize(static_cast<Qt::MouseButton>(button));
}
void AuroraeClient::titlebarDblClickOperation()
{
// the double click operation can result in a window being maximized
// see maximize
QMetaObject::invokeMethod(qobject_cast< KDecorationUnstable* >(this), "doTitlebarDblClickOperation", Qt::QueuedConnection);
}
void AuroraeClient::doTitlebarDblClickOperation()
{
KDecorationUnstable::titlebarDblClickOperation();
}
} // namespace Aurorae
extern "C"
......
......@@ -145,10 +145,14 @@ public slots:
void titleReleased(Qt::MouseButton button, Qt::MouseButtons buttons);
void titleMouseMoved(Qt::MouseButton button, Qt::MouseButtons buttons);
void closeWindow();
void titlebarDblClickOperation();
void maximize(int button);
private slots:
void themeChanged();
void doCloseWindow();
void doTitlebarDblClickOperation();
void doMaximzie(int button);
private:
QGraphicsView *m_view;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment