Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/x11/standalone/windowselector.cpp
Show All 14 Lines | |||||
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | GNU General Public License for more details. | 17 | GNU General Public License for more details. | ||
18 | 18 | | |||
19 | You should have received a copy of the GNU General Public License | 19 | You should have received a copy of the GNU General Public License | ||
20 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 20 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | *********************************************************************/ | 21 | *********************************************************************/ | ||
22 | #include "windowselector.h" | 22 | #include "windowselector.h" | ||
23 | #include "client.h" | 23 | #include "x11client.h" | ||
24 | #include "cursor.h" | 24 | #include "cursor.h" | ||
25 | #include "unmanaged.h" | 25 | #include "unmanaged.h" | ||
26 | #include "workspace.h" | 26 | #include "workspace.h" | ||
27 | #include "xcbutils.h" | 27 | #include "xcbutils.h" | ||
28 | // XLib | 28 | // XLib | ||
29 | #include <X11/cursorfont.h> | 29 | #include <X11/cursorfont.h> | ||
30 | #include <X11/Xutil.h> | 30 | #include <X11/Xutil.h> | ||
31 | #include <fixx11h.h> | 31 | #include <fixx11h.h> | ||
▲ Show 20 Lines • Show All 204 Lines • ▼ Show 20 Line(s) | |||||
236 | 236 | | |||
237 | void WindowSelector::selectWindowId(xcb_window_t window_to_select) | 237 | void WindowSelector::selectWindowId(xcb_window_t window_to_select) | ||
238 | { | 238 | { | ||
239 | if (window_to_select == XCB_WINDOW_NONE) { | 239 | if (window_to_select == XCB_WINDOW_NONE) { | ||
240 | m_callback(nullptr); | 240 | m_callback(nullptr); | ||
241 | return; | 241 | return; | ||
242 | } | 242 | } | ||
243 | xcb_window_t window = window_to_select; | 243 | xcb_window_t window = window_to_select; | ||
244 | Client* client = nullptr; | 244 | X11Client *client = nullptr; | ||
245 | while (true) { | 245 | while (true) { | ||
246 | client = Workspace::self()->findClient(Predicate::FrameIdMatch, window); | 246 | client = Workspace::self()->findClient(Predicate::FrameIdMatch, window); | ||
247 | if (client) { | 247 | if (client) { | ||
248 | break; // Found the client | 248 | break; // Found the client | ||
249 | } | 249 | } | ||
250 | Xcb::Tree tree(window); | 250 | Xcb::Tree tree(window); | ||
251 | if (window == tree->root) { | 251 | if (window == tree->root) { | ||
252 | // We didn't find the client, probably an override-redirect window | 252 | // We didn't find the client, probably an override-redirect window | ||
Show All 21 Lines |