fix(frontend):wlcom环境适配多屏显示功能
This commit is contained in:
parent
f1f45ad27f
commit
603d0578b7
|
@ -15,6 +15,7 @@ find_package(QT NAMES Qt6 Qt5 COMPONENTS Core DBus Widgets Xml Concurrent Sql Li
|
|||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core DBus Widgets Xml Concurrent Sql LinguistTools X11Extras REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(KF5WindowSystem)
|
||||
find_package(ukui-quick COMPONENTS platform REQUIRED)
|
||||
|
||||
set(UKUI_SEARCH_EXTERNAL_LIBS "")
|
||||
set(UKUI_SEARCH_PC_PKGS gio-2.0 glib-2.0 gio-unix-2.0 kysdk-waylandhelper xapian-core gsettings-qt)
|
||||
|
@ -97,6 +98,7 @@ target_link_libraries(frontend PRIVATE
|
|||
kysdk-waylandhelper
|
||||
qtsingleapplication
|
||||
tcmalloc_minimal
|
||||
ukui-quick::platform
|
||||
)
|
||||
|
||||
target_include_directories(frontend PRIVATE
|
||||
|
|
|
@ -33,8 +33,9 @@
|
|||
#include <KWindowSystem>
|
||||
#include <QtX11Extras/QX11Info>
|
||||
#include <gperftools/malloc_extension.h>
|
||||
#include "ukuistylehelper/ukuistylehelper.h"
|
||||
#include "windowmanager/windowmanager.h"
|
||||
#include <ukuistylehelper/ukuistylehelper.h>
|
||||
#include <windowmanager/windowmanager.h>
|
||||
#include <window-helper.h>
|
||||
#include "global-settings.h"
|
||||
#include "action-transmiter.h"
|
||||
#include "icon-loader.h"
|
||||
|
@ -268,7 +269,7 @@ void MainWindow::centerToScreen(QWidget* widget) {
|
|||
if(!widget)
|
||||
return;
|
||||
KWindowSystem::setState(this->winId(),NET::SkipTaskbar | NET::SkipPager | NET::SkipSwitcher);
|
||||
QRect desk_rect = qApp->screenAt(QCursor::pos())->geometry();
|
||||
QRect desk_rect = UkuiQuick::WindowProxy::currentScreen()->geometry();
|
||||
int desk_x = desk_rect.width();
|
||||
int desk_y = desk_rect.height();
|
||||
int x = widget->width();
|
||||
|
|
Loading…
Reference in New Issue