Skip to content

Commit 06cfa58

Browse files
authored
Fix pin tool wrong offset on Linux (flameshot-org#3369)
1 parent ad39060 commit 06cfa58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tools/pin/pinwidget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ PinWidget::PinWidget(const QPixmap& pixmap,
5858
new QShortcut(Qt::Key_Escape, this, SLOT(close()));
5959

6060
qreal devicePixelRatio = 1;
61-
#if defined(Q_OS_MACOS)
61+
#if defined(Q_OS_MACOS) || defined(Q_OS_LINUX)
6262
QScreen* currentScreen = QGuiAppCurrentScreen().currentScreen();
6363
if (currentScreen != nullptr) {
6464
devicePixelRatio = currentScreen->devicePixelRatio();
@@ -72,7 +72,7 @@ PinWidget::PinWidget(const QPixmap& pixmap,
7272
setWindowFlags(Qt::X11BypassWindowManagerHint);
7373
#endif
7474

75-
#if defined(Q_OS_MACOS)
75+
#if defined(Q_OS_MACOS) || defined(Q_OS_LINUX)
7676
if (currentScreen != nullptr) {
7777
QPoint topLeft = currentScreen->geometry().topLeft();
7878
adjusted_pos.setX((adjusted_pos.x() - topLeft.x()) / devicePixelRatio +

0 commit comments

Comments
 (0)