diff --git a/x11client.cpp b/x11client.cpp index 6e2509d3cf..00cd48ac35 100644 --- a/x11client.cpp +++ b/x11client.cpp @@ -1705,7 +1705,7 @@ void X11Client::updateHiddenPreview() } } -void X11Client::sendClientMessage(xcb_window_t w, xcb_atom_t a, xcb_atom_t protocol, uint32_t data1, uint32_t data2, uint32_t data3, xcb_timestamp_t timestamp) +void X11Client::sendClientMessage(xcb_window_t w, xcb_atom_t a, xcb_atom_t protocol, uint32_t data1, uint32_t data2, uint32_t data3) { xcb_client_message_event_t ev; memset(&ev, 0, sizeof(ev)); @@ -1714,7 +1714,7 @@ void X11Client::sendClientMessage(xcb_window_t w, xcb_atom_t a, xcb_atom_t proto ev.type = a; ev.format = 32; ev.data.data32[0] = protocol; - ev.data.data32[1] = timestamp; + ev.data.data32[1] = xTime(); ev.data.data32[2] = data1; ev.data.data32[3] = data2; ev.data.data32[4] = data3; @@ -2029,7 +2029,8 @@ void X11Client::takeFocus() else demandAttention(false); // window cannot take input, at least withdraw urgency if (info->supportsProtocol(NET::TakeFocusProtocol)) { - sendClientMessage(window(), atoms->wm_protocols, atoms->wm_take_focus, 0, 0, 0, XCB_CURRENT_TIME); + updateXTime(); + sendClientMessage(window(), atoms->wm_protocols, atoms->wm_take_focus); } workspace()->setShouldGetFocus(this); diff --git a/x11client.h b/x11client.h index 268f6aaaa5..8d5f193c45 100644 --- a/x11client.h +++ b/x11client.h @@ -426,8 +426,7 @@ private: void killProcess(bool ask, xcb_timestamp_t timestamp = XCB_TIME_CURRENT_TIME); void updateUrgency(); static void sendClientMessage(xcb_window_t w, xcb_atom_t a, xcb_atom_t protocol, - uint32_t data1 = 0, uint32_t data2 = 0, uint32_t data3 = 0, - xcb_timestamp_t timestamp = xTime()); + uint32_t data1 = 0, uint32_t data2 = 0, uint32_t data3 = 0); void embedClient(xcb_window_t w, xcb_visualid_t visualid, xcb_colormap_t colormap, uint8_t depth); void detectNoBorder();