Move performMoveResize to AbstractClient
As there is X11 specific code, this is moved into a virtual doPerformMoveResize method.icc-effect-5.14.5
parent
43e4071975
commit
7e23860957
|
@ -1133,4 +1133,8 @@ void AbstractClient::positionGeometryTip()
|
|||
{
|
||||
}
|
||||
|
||||
void AbstractClient::doPerformMoveResize()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -717,6 +717,14 @@ protected:
|
|||
**/
|
||||
virtual void leaveMoveResize();
|
||||
virtual void positionGeometryTip();
|
||||
void performMoveResize();
|
||||
/**
|
||||
* Called from performMoveResize() after actually performing the change of geometry.
|
||||
* Implementing subclasses can perform windowing system specific handling here.
|
||||
*
|
||||
* Default implementation does nothing.
|
||||
**/
|
||||
virtual void doPerformMoveResize();
|
||||
|
||||
static bool haveResizeEffect() {
|
||||
return s_haveResizeEffect;
|
||||
|
|
2
client.h
2
client.h
|
@ -469,10 +469,10 @@ protected:
|
|||
void updateTabGroupStates(TabGroup::States states) override;
|
||||
void doMove(int x, int y) override;
|
||||
bool doStartMoveResize() override;
|
||||
void doPerformMoveResize() override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void delayedSetShortcut();
|
||||
void performMoveResize();
|
||||
|
||||
//Signals for the scripting interface
|
||||
//Signals make an excellent way for communication
|
||||
|
|
15
geometry.cpp
15
geometry.cpp
|
@ -3156,7 +3156,7 @@ void Client::handleMoveResize(int x, int y, int x_root, int y_root)
|
|||
if (isResize() && !haveResizeEffect()) {
|
||||
if (!syncRequest.timeout) {
|
||||
syncRequest.timeout = new QTimer(this);
|
||||
connect(syncRequest.timeout, SIGNAL(timeout()), SLOT(performMoveResize()));
|
||||
connect(syncRequest.timeout, &QTimer::timeout, this, &Client::performMoveResize);
|
||||
syncRequest.timeout->setSingleShot(true);
|
||||
}
|
||||
if (syncRequest.counter != XCB_NONE) {
|
||||
|
@ -3176,21 +3176,26 @@ void Client::handleMoveResize(int x, int y, int x_root, int y_root)
|
|||
}
|
||||
}
|
||||
|
||||
void Client::performMoveResize()
|
||||
void AbstractClient::performMoveResize()
|
||||
{
|
||||
const QRect &moveResizeGeom = moveResizeGeometry();
|
||||
if (isMove() || (isResize() && !haveResizeEffect())) {
|
||||
setGeometry(moveResizeGeom);
|
||||
}
|
||||
if (syncRequest.counter == XCB_NONE) // client w/o XSYNC support. allow the next resize event
|
||||
syncRequest.isPending = false; // NEVER do this for clients with a valid counter
|
||||
// (leads to sync request races in some clients)
|
||||
doPerformMoveResize();
|
||||
if (isResize())
|
||||
addRepaintFull();
|
||||
positionGeometryTip();
|
||||
emit clientStepUserMovedResized(this, moveResizeGeom);
|
||||
}
|
||||
|
||||
void Client::doPerformMoveResize()
|
||||
{
|
||||
if (syncRequest.counter == XCB_NONE) // client w/o XSYNC support. allow the next resize event
|
||||
syncRequest.isPending = false; // NEVER do this for clients with a valid counter
|
||||
// (leads to sync request races in some clients)
|
||||
}
|
||||
|
||||
void AbstractClient::setElectricBorderMode(QuickTileMode mode)
|
||||
{
|
||||
if (mode != QuickTileMaximize) {
|
||||
|
|
Loading…
Reference in New Issue