Use the wrapper methods for Client::m_client instead of xcb_foo
This commit is contained in:
parent
c1483f41d4
commit
0d9ab27798
2 changed files with 9 additions and 9 deletions
12
client.cpp
12
client.cpp
|
@ -289,14 +289,14 @@ void Client::releaseWindow(bool on_shutdown)
|
|||
xcb_delete_property(c, m_client, atoms->kde_net_wm_frame_strut);
|
||||
xcb_reparent_window(c, m_client, rootWindow(), x(), y());
|
||||
xcb_change_save_set(c, XCB_SET_MODE_DELETE, m_client);
|
||||
Xcb::selectInput(m_client, XCB_EVENT_MASK_NO_EVENT);
|
||||
m_client.selectInput(XCB_EVENT_MASK_NO_EVENT);
|
||||
if (on_shutdown)
|
||||
// Map the window, so it can be found after another WM is started
|
||||
xcb_map_window(connection(), m_client);
|
||||
m_client.map();
|
||||
// TODO: Preserve minimized, shaded etc. state?
|
||||
else // Make sure it's not mapped if the app unmapped it (#65279). The app
|
||||
// may do map+unmap before we initially map the window by calling rawShow() from manage().
|
||||
xcb_unmap_window(connection(), m_client);
|
||||
m_client.unmap();
|
||||
m_client.reset();
|
||||
m_wrapper.reset();
|
||||
XDestroyWindow(display(), frameId());
|
||||
|
@ -962,7 +962,7 @@ void Client::setShade(ShadeMode mode)
|
|||
s.setHeight(border_top + border_bottom);
|
||||
m_wrapper.selectInput(ClientWinMask); // Avoid getting UnmapNotify
|
||||
m_wrapper.unmap();
|
||||
xcb_unmap_window(connection(), m_client);
|
||||
m_client.unmap();
|
||||
m_wrapper.selectInput(ClientWinMask | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY);
|
||||
exportMappingState(IconicState);
|
||||
plainResize(s);
|
||||
|
@ -1190,7 +1190,7 @@ void Client::map()
|
|||
XMapWindow(display(), frameId());
|
||||
if (!isShade()) {
|
||||
m_wrapper.map();
|
||||
xcb_map_window(connection(), m_client);
|
||||
m_client.map();
|
||||
m_decoInputExtent.map();
|
||||
exportMappingState(NormalState);
|
||||
} else
|
||||
|
@ -1211,7 +1211,7 @@ void Client::unmap()
|
|||
m_wrapper.selectInput(ClientWinMask); // Avoid getting UnmapNotify
|
||||
XUnmapWindow(display(), frameId());
|
||||
m_wrapper.unmap();
|
||||
xcb_unmap_window(connection(), m_client);
|
||||
m_client.unmap();
|
||||
m_decoInputExtent.unmap();
|
||||
m_wrapper.selectInput(ClientWinMask | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY);
|
||||
if (decoration != NULL)
|
||||
|
|
|
@ -641,8 +641,8 @@ void Client::embedClient(xcb_window_t w, const XWindowAttributes& attr)
|
|||
// We don't want the window to be destroyed when we quit
|
||||
xcb_change_save_set(conn, XCB_SET_MODE_INSERT, m_client);
|
||||
|
||||
xcb_change_window_attributes(conn, m_client, XCB_CW_EVENT_MASK, &zero_value);
|
||||
xcb_unmap_window(conn, m_client);
|
||||
m_client.selectInput(zero_value);
|
||||
m_client.unmap();
|
||||
xcb_configure_window(conn, m_client, XCB_CONFIG_WINDOW_BORDER_WIDTH, &zero_value);
|
||||
|
||||
// Note: These values must match the order in the xcb_cw_t enum
|
||||
|
@ -693,7 +693,7 @@ void Client::embedClient(xcb_window_t w, const XWindowAttributes& attr)
|
|||
// receiving any unexpected events from the wrapper creation or the reparenting.
|
||||
xcb_change_window_attributes(conn, frame, XCB_CW_EVENT_MASK, &frame_event_mask);
|
||||
xcb_change_window_attributes(conn, m_wrapper, XCB_CW_EVENT_MASK, &wrapper_event_mask);
|
||||
xcb_change_window_attributes(conn, m_client, XCB_CW_EVENT_MASK, &client_event_mask);
|
||||
m_client.selectInput(client_event_mask);
|
||||
|
||||
updateMouseGrab();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue