Skip to content

Commit

Permalink
pinwidget: allow moving widget partially outside of screen under linux (
Browse files Browse the repository at this point in the history
#2520)

Co-authored-by: zhangfuwen <zhangfuwen@foxmail.com>
  • Loading branch information
zhangfuwen and zhangfuwen authored Apr 6, 2022
1 parent 6ebd0fb commit 850260d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tools/pin/pinwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ PinWidget::PinWidget(const QPixmap& pixmap,
const int m = MARGIN * devicePixelRatio;
QRect adjusted_pos = geometry + QMargins(m, m, m, m);
setGeometry(adjusted_pos);
#if defined(Q_OS_LINUX)
setWindowFlags(Qt::X11BypassWindowManagerHint);
#endif

#if defined(Q_OS_MACOS)
if (currentScreen) {
QPoint topLeft = currentScreen->geometry().topLeft();
Expand Down

0 comments on commit 850260d

Please sign in to comment.