Skip to content

Commit

Permalink
Fix wayland header handling by using startSystemMove() method
Browse files Browse the repository at this point in the history
  • Loading branch information
alpemwarrior committed Sep 7, 2022
1 parent c8a33cc commit bc58f8b
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/ui/cloud-view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,22 +289,9 @@ void CloudView::onCloseBtnClicked()
bool CloudView::eventFilter(QObject* obj, QEvent* event)
{
if (obj == mHeader) {
static QPoint oldPos;
if (event->type() == QEvent::MouseButtonPress) {
QMouseEvent* ev = (QMouseEvent*)event;
oldPos = ev->globalPos();

return true;
}
else if (event->type() == QEvent::MouseMove) {
QMouseEvent* ev = (QMouseEvent*)event;
const QPoint delta = ev->globalPos() - oldPos;

MainWindow* win = seafApplet->mainWindow();
win->move(win->x() + delta.x(), win->y() + delta.y());

oldPos = ev->globalPos();
return true;
QWindow* win = seafApplet->mainWindow()->windowHandle();
win->startSystemMove();
}
}
else if (obj == mDropArea) {
Expand Down

0 comments on commit bc58f8b

Please sign in to comment.