fix: 修复任务栏应用需要点击两次才能active的问题
修复任务栏应用需要点击两次才能active的问题 Log: Task: https://pms.uniontech.com/task-view-142531.html Influence: 任务栏应用一次点击就可以打开 Change-Id: I792202025a155a21ad7133887c17289b9a653c6f
This commit is contained in:
@ -170,7 +170,9 @@ void XCBUtils::setActiveWindow(XWindow xid)
|
||||
|
||||
void XCBUtils::changeActiveWindow(XWindow newActiveXid)
|
||||
{
|
||||
xcb_ewmh_request_change_active_window(&m_ewmh, m_screenNum, newActiveXid, XCB_EWMH_CLIENT_SOURCE_TYPE_OTHER, 0, 0);
|
||||
xcb_ewmh_request_change_active_window(&m_ewmh, m_screenNum, newActiveXid, XCB_EWMH_CLIENT_SOURCE_TYPE_OTHER, XCB_CURRENT_TIME, XCB_WINDOW_NONE);
|
||||
// 此处getActiveWindow作用是触发缓冲机制,执行设置活动窗口动作
|
||||
getActiveWindow();
|
||||
}
|
||||
|
||||
void XCBUtils::restackWindow(XWindow xid)
|
||||
@ -370,6 +372,11 @@ void XCBUtils::setCurrentWMDesktop(uint32_t desktop)
|
||||
xcb_ewmh_set_current_desktop(&m_ewmh, m_screenNum, desktop);
|
||||
}
|
||||
|
||||
void XCBUtils::changeCurrentDesktop(uint32_t newDesktop, uint32_t timestamp)
|
||||
{
|
||||
xcb_ewmh_request_change_current_desktop(&m_ewmh, m_screenNum, newDesktop, timestamp);
|
||||
}
|
||||
|
||||
uint32_t XCBUtils::getCurrentWMDesktop()
|
||||
{
|
||||
uint32_t ret;
|
||||
|
@ -135,7 +135,7 @@ public:
|
||||
// 获取活动窗口 _NET_ACTIVE_WINDOW
|
||||
XWindow getActiveWindow();
|
||||
|
||||
// 设置活动窗口 _NET_ACTIVE_WINDOW
|
||||
// 设置活动窗口 _NET_ACTIVE_WINDOW 属性
|
||||
void setActiveWindow(XWindow xid);
|
||||
|
||||
// 改变活动窗口
|
||||
@ -221,9 +221,12 @@ public:
|
||||
// 设置窗口当前桌面
|
||||
void setWMDesktop(XWindow xid, uint32_t desktop);
|
||||
|
||||
// 设置桌面
|
||||
// 设置当前桌面属性
|
||||
void setCurrentWMDesktop(uint32_t desktop);
|
||||
|
||||
// 请求改变当前桌面
|
||||
void changeCurrentDesktop(uint32_t newDesktop, uint32_t timestamp);
|
||||
|
||||
// 获取当前桌面 _NET_CURRENT_DESKTOP
|
||||
uint32_t getCurrentWMDesktop();
|
||||
|
||||
|
Reference in New Issue
Block a user