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
This commit is contained in:
parent
c79bf24903
commit
874fccacd5
2 changed files with 32 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue