Skip to content

Commit

Permalink
feat: 在光标所在屏幕唤起雷神窗口 (#294)
Browse files Browse the repository at this point in the history
之前雷神窗口只能够在主屏唤起。当前提交使得雷神窗口可以在任意光标所在的屏幕上被唤起。

Issue: linuxdeepin/developer-center#5455
Log: 在光标所在屏幕唤起雷神窗口

Signed-off-by: Yutao Meng <[email protected]>
  • Loading branch information
ArchieMeng authored Sep 7, 2023
1 parent 088cf74 commit cf0987a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/windowsmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "define.h"

#include <QDebug>
#include <QScreen>

WindowsManager *WindowsManager::pManager = new WindowsManager();
WindowsManager *WindowsManager::instance()
Expand All @@ -30,6 +31,9 @@ void WindowsManager::runQuakeWindow(TermProperties properties)
m_quakeWindow->activateWindow();
return;
}
// 雷神窗口移动到光标所在的屏幕
QPoint cursorPoint = QCursor::pos();
m_quakeWindow->move(QGuiApplication::screenAt(cursorPoint)->geometry().topLeft());
// Alt+F2的显隐功能实现点
quakeWindowShowOrHide();
}
Expand Down

0 comments on commit cf0987a

Please sign in to comment.