Changeset View
Changeset View
Standalone View
Standalone View
events.cpp
Show First 20 Lines • Show All 298 Lines • ▼ Show 20 Line(s) | 291 | #endif | |||
---|---|---|---|---|---|
299 | } | 299 | } | ||
300 | break; | 300 | break; | ||
301 | } | 301 | } | ||
302 | case XCB_KEY_PRESS: { | 302 | case XCB_KEY_PRESS: { | ||
303 | int keyQt; | 303 | int keyQt; | ||
304 | xcb_key_press_event_t *event = reinterpret_cast<xcb_key_press_event_t*>(e); | 304 | xcb_key_press_event_t *event = reinterpret_cast<xcb_key_press_event_t*>(e); | ||
305 | KKeyServer::xcbKeyPressEventToQt(event, &keyQt); | 305 | KKeyServer::xcbKeyPressEventToQt(event, &keyQt); | ||
306 | // qDebug() << "Workspace::keyPress( " << keyQt << " )"; | 306 | // qDebug() << "Workspace::keyPress( " << keyQt << " )"; | ||
307 | if (Client *c = dynamic_cast<Client*>(movingClient)) { | | |||
308 | c->keyPressEvent(keyQt, event->time); | | |||
309 | return true; | | |||
310 | } | | |||
311 | #ifdef KWIN_BUILD_TABBOX | 307 | #ifdef KWIN_BUILD_TABBOX | ||
312 | if (TabBox::TabBox::self()->isGrabbed()) { | 308 | if (TabBox::TabBox::self()->isGrabbed()) { | ||
313 | TabBox::TabBox::self()->keyPress(keyQt); | 309 | TabBox::TabBox::self()->keyPress(keyQt); | ||
314 | return true; | 310 | return true; | ||
315 | } | 311 | } | ||
316 | #endif | 312 | #endif | ||
317 | break; | 313 | break; | ||
318 | } | 314 | } | ||
Show All 33 Lines | 346 | } else { | |||
352 | if (eventType == XCB_PROPERTY_NOTIFY) { | 348 | if (eventType == XCB_PROPERTY_NOTIFY) { | ||
353 | auto *event = reinterpret_cast<xcb_property_notify_event_t*>(e); | 349 | auto *event = reinterpret_cast<xcb_property_notify_event_t*>(e); | ||
354 | if (event->window == rootWindow()) { | 350 | if (event->window == rootWindow()) { | ||
355 | emit propertyNotify(event->atom); | 351 | emit propertyNotify(event->atom); | ||
356 | } | 352 | } | ||
357 | } | 353 | } | ||
358 | } | 354 | } | ||
359 | } | 355 | } | ||
360 | if (Client *c = dynamic_cast<Client*>(movingClient)) { | | |||
361 | if (eventType == XCB_BUTTON_PRESS || eventType == XCB_BUTTON_RELEASE || eventType == XCB_MOTION_NOTIFY) { | | |||
362 | if (c->moveResizeGrabWindow() == reinterpret_cast<xcb_button_press_event_t*>(e)->event && c->windowEvent(e)) { | | |||
363 | return true; | | |||
364 | } | | |||
365 | } | | |||
366 | } | | |||
367 | 356 | | |||
368 | switch (eventType) { | 357 | switch (eventType) { | ||
369 | case XCB_CREATE_NOTIFY: { | 358 | case XCB_CREATE_NOTIFY: { | ||
370 | const auto *event = reinterpret_cast<xcb_create_notify_event_t*>(e); | 359 | const auto *event = reinterpret_cast<xcb_create_notify_event_t*>(e); | ||
371 | if (event->parent == rootWindow() && | 360 | if (event->parent == rootWindow() && | ||
372 | !QWidget::find(event->window) && | 361 | !QWidget::find(event->window) && | ||
373 | !event->override_redirect) { | 362 | !event->override_redirect) { | ||
374 | // see comments for allowClientActivation() | 363 | // see comments for allowClientActivation() | ||
▲ Show 20 Lines • Show All 1136 Lines • Show Last 20 Lines |