Skip to content

Commit

Permalink
Ignore moving/sizing requests, when a moving or sizing is already in …
Browse files Browse the repository at this point in the history
…progress.
  • Loading branch information
gijsbers committed Jun 15, 2024
1 parent 17b3dca commit 9043952
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/movesize.cc
Original file line number Diff line number Diff line change
Expand Up @@ -830,9 +830,11 @@ bool YFrameWindow::canSize(bool horiz, bool vert) {
return true;
}

void YFrameWindow::startMoveSize(int x, int y,
int direction)
void YFrameWindow::netMoveSize(int x, int y, int direction)
{
if (movingWindow || sizingWindow)
return;

int sx[] = { -1, 0, 1, 1, 1, 0, -1, -1, };
int sy[] = { -1, -1, -1, 0, 1, 1, 1, 0, };

Expand Down
4 changes: 2 additions & 2 deletions src/wmclient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -955,8 +955,8 @@ void YFrameClient::handleClientMessage(const XClientMessageEvent &message) {
message.format == 32)
{
if (getFrame())
getFrame()->startMoveSize(message.data.l[0], message.data.l[1],
message.data.l[2]);
getFrame()->netMoveSize(message.data.l[0], message.data.l[1],
message.data.l[2]);
} else if (message.message_type == _XA_NET_MOVERESIZE_WINDOW) {
if (getFrame()) {
long flag = message.data.l[0];
Expand Down
2 changes: 1 addition & 1 deletion src/wmframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class YFrameWindow:
YFrameTitleBar *titlebar();
YClientContainer *container() const { return fContainer; }

void startMoveSize(int x, int y, int direction);
void netMoveSize(int x, int y, int direction);

void startMoveSize(bool doMove, bool byMouse,
int sideX, int sideY,
Expand Down

0 comments on commit 9043952

Please sign in to comment.