mirror of
https://github.com/Ximi1970/systray-x.git
synced 2026-02-01 03:49:03 +01:00
Enable find window by pid
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
/*
|
||||
* Statics
|
||||
*/
|
||||
quint64 WindowCtrlWin::m_tb_window;
|
||||
QList< quint64 > WindowCtrlWin::m_tb_windows;
|
||||
|
||||
|
||||
@@ -24,6 +25,10 @@ QList< quint64 > WindowCtrlWin::m_tb_windows;
|
||||
*/
|
||||
WindowCtrlWin::WindowCtrlWin( QObject *parent) : QObject( parent )
|
||||
{
|
||||
/*
|
||||
* Initialize
|
||||
*/
|
||||
m_tb_window = 0;
|
||||
m_tb_windows = QList< quint64 >();
|
||||
}
|
||||
|
||||
@@ -111,7 +116,7 @@ bool WindowCtrlWin::findWindow( qint64 pid )
|
||||
/*
|
||||
* Store it
|
||||
*/
|
||||
m_tb_windows.append( (quint64)data.hwnd );
|
||||
m_tb_window = (quint64)data.hwnd;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -161,9 +166,27 @@ void WindowCtrlWin::displayWindowElements( const QString& title )
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Display the window elements
|
||||
*/
|
||||
void WindowCtrlWin::displayWindowElements( quint64 window )
|
||||
{
|
||||
emit signalConsole( QString( "Found: XID %1" ).arg( window ) );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Get the Thunderbird window ID
|
||||
*/
|
||||
quint64 WindowCtrlWin::getWinId()
|
||||
{
|
||||
return m_tb_window;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Get the Thunderbird window IDs
|
||||
*/
|
||||
QList< quint64 > WindowCtrlWin::getWinIds()
|
||||
{
|
||||
return m_tb_windows;
|
||||
|
||||
@@ -70,6 +70,20 @@ class WindowCtrlWin : public QObject
|
||||
*/
|
||||
void displayWindowElements( const QString& title );
|
||||
|
||||
/**
|
||||
* @brief displayWindowElements. Display window elements.
|
||||
*
|
||||
* @param title The window id.
|
||||
*/
|
||||
void displayWindowElements( quint64 window );
|
||||
|
||||
/**
|
||||
* @brief getWinId. Get the Thunderbird window ID.
|
||||
*
|
||||
* @return The TB window ID.
|
||||
*/
|
||||
quint64 getWinId();
|
||||
|
||||
/**
|
||||
* @brief getWinIds. Get the Thunderbird window IDs.
|
||||
*
|
||||
@@ -173,6 +187,11 @@ class WindowCtrlWin : public QObject
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* @brief m_tb_window. The Thunderbird window.
|
||||
*/
|
||||
static quint64 m_tb_window;
|
||||
|
||||
/**
|
||||
* @brief m_tb_window. The Thunderbird windows.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user