Skip to content

Commit

Permalink
sync: from linuxdeepin/dtkwidget
Browse files Browse the repository at this point in the history
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#535
  • Loading branch information
deepin-ci-robot committed Nov 9, 2023
1 parent 50bd273 commit aaa8465
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,15 @@ StartupNotificationMonitor::StartupNotificationMonitor() :
int screen = 0;

xcb_screen_t *s = xcb_aux_get_screen (QX11Info::connection(), screen);
const uint32_t select_input_val[] = { XCB_EVENT_MASK_PROPERTY_CHANGE };
xcb_change_window_attributes (QX11Info::connection(), s->root, XCB_CW_EVENT_MASK,
select_input_val);
xcb_get_window_attributes_cookie_t attr_cookie = xcb_get_window_attributes(QX11Info::connection(),s->root);
xcb_get_window_attributes_reply_t *attr_reply = xcb_get_window_attributes_reply(QX11Info::connection(),attr_cookie,NULL);
uint32_t old_event_mask = attr_reply->your_event_mask;

if(!(old_event_mask & XCB_EVENT_MASK_PROPERTY_CHANGE)) {
const uint32_t select_input_val[] = { XCB_EVENT_MASK_PROPERTY_CHANGE | old_event_mask};
xcb_change_window_attributes (QX11Info::connection(), s->root, XCB_CW_EVENT_MASK,
select_input_val);
}

display = sn_xcb_display_new (QX11Info::connection(), NULL, NULL);

Expand Down

0 comments on commit aaa8465

Please sign in to comment.