mirror of
https://github.com/Ximi1970/systray-x.git
synced 2026-02-05 22:09:03 +01:00
Add window move when normalizing
This commit is contained in:
@@ -23,7 +23,10 @@ QT += core gui widgets
|
||||
unix:!macx: {
|
||||
contains(DEFINES,KDE_INTEGRATION) {
|
||||
lessThan(QT_MAJOR_VERSION, 6): {
|
||||
QT += dbus KNotifications
|
||||
QT += dbus
|
||||
|
||||
INCLUDEPATH += /usr/include/KF5/KNotifications
|
||||
LIBS += -lKF5Notifications
|
||||
}
|
||||
greaterThan(QT_MAJOR_VERSION, 5): {
|
||||
INCLUDEPATH += /usr/include/KF6/KStatusNotifierItem
|
||||
|
||||
@@ -432,6 +432,11 @@ void WindowCtrlUnix::minimizeWindowToTaskbar( quint64 window )
|
||||
emit signalConsole( "Minimize to taskbar" );
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Store the current window positions
|
||||
*/
|
||||
updatePositions();
|
||||
|
||||
/*
|
||||
* Save the hints
|
||||
*/
|
||||
@@ -477,6 +482,11 @@ void WindowCtrlUnix::minimizeWindowToTray( quint64 window )
|
||||
emit signalConsole( "Minimize to system tray" );
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Store the current window positions
|
||||
*/
|
||||
updatePositions();
|
||||
|
||||
/*
|
||||
* Save the hints
|
||||
*/
|
||||
@@ -611,6 +621,13 @@ void WindowCtrlUnix::normalizeWindow( quint64 window )
|
||||
*/
|
||||
Sync( m_display );
|
||||
|
||||
/*
|
||||
* Move the window to the last recorded position, seems to be needed for wayland
|
||||
*/
|
||||
QPoint pos = m_tb_window_positions[ window ];
|
||||
MoveWindow( m_display, window, pos.x(), pos.y() );
|
||||
Flush( m_display );
|
||||
|
||||
/*
|
||||
* Let us wait a bit, maybe this helps...
|
||||
*/
|
||||
|
||||
@@ -174,15 +174,6 @@ void WindowCtrl::slotWindowState( Preferences::WindowState state, int id )
|
||||
|
||||
QList< quint64 > win_ids = getWinIds();
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
|
||||
/*
|
||||
* Update window positions
|
||||
*/
|
||||
updatePositions();
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Minimize/dock all
|
||||
*/
|
||||
@@ -253,15 +244,6 @@ void WindowCtrl::slotShowHide()
|
||||
*/
|
||||
normalizeWindowsHidden();
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
|
||||
/*
|
||||
* Update the positions
|
||||
*/
|
||||
updatePositions();
|
||||
|
||||
#endif
|
||||
|
||||
TargetType target_type = TargetType::TYPE_WINDOW_TO_SYSTEMTRAY;
|
||||
|
||||
Reference in New Issue
Block a user