Changeset View
Changeset View
Standalone View
Standalone View
client.cpp
Show First 20 Lines • Show All 639 Lines • ▼ Show 20 Line(s) | 638 | if (shape()) { | |||
---|---|---|---|---|---|
640 | if (!app_noborder) { | 640 | if (!app_noborder) { | ||
641 | // Only when shape is detected for the first time, still let the user to override | 641 | // Only when shape is detected for the first time, still let the user to override | ||
642 | app_noborder = true; | 642 | app_noborder = true; | ||
643 | noborder = rules()->checkNoBorder(true); | 643 | noborder = rules()->checkNoBorder(true); | ||
644 | updateDecoration(true); | 644 | updateDecoration(true); | ||
645 | } | 645 | } | ||
646 | if (noBorder()) { | 646 | if (noBorder()) { | ||
647 | xcb_shape_combine(connection(), XCB_SHAPE_SO_SET, XCB_SHAPE_SK_BOUNDING, XCB_SHAPE_SK_BOUNDING, | 647 | xcb_shape_combine(connection(), XCB_SHAPE_SO_SET, XCB_SHAPE_SK_BOUNDING, XCB_SHAPE_SK_BOUNDING, | ||
648 | frameId(), clientPos().x(), clientPos().y(), window()); | 648 | frameId(), Xcb::scX(clientPos().x()), Xcb::scX(clientPos().y()), window()); | ||
649 | } | 649 | } | ||
650 | } else if (app_noborder) { | 650 | } else if (app_noborder) { | ||
651 | xcb_shape_mask(connection(), XCB_SHAPE_SO_SET, XCB_SHAPE_SK_BOUNDING, frameId(), 0, 0, XCB_PIXMAP_NONE); | 651 | xcb_shape_mask(connection(), XCB_SHAPE_SO_SET, XCB_SHAPE_SK_BOUNDING, frameId(), 0, 0, XCB_PIXMAP_NONE); | ||
652 | detectNoBorder(); | 652 | detectNoBorder(); | ||
653 | app_noborder = noborder; | 653 | app_noborder = noborder; | ||
654 | noborder = rules()->checkNoBorder(noborder || m_motif.noBorder()); | 654 | noborder = rules()->checkNoBorder(noborder || m_motif.noBorder()); | ||
655 | updateDecoration(true); | 655 | updateDecoration(true); | ||
656 | } | 656 | } | ||
Show All 32 Lines | 679 | if (Xcb::Extensions::self()->isShapeInputAvailable()) { | |||
689 | // TODO: It seems there is, after all - XShapeGetRectangles() - but maybe this is better | 689 | // TODO: It seems there is, after all - XShapeGetRectangles() - but maybe this is better | ||
690 | if (!shape_helper_window.isValid()) | 690 | if (!shape_helper_window.isValid()) | ||
691 | shape_helper_window.create(QRect(0, 0, 1, 1)); | 691 | shape_helper_window.create(QRect(0, 0, 1, 1)); | ||
692 | shape_helper_window.resize(width(), height()); | 692 | shape_helper_window.resize(width(), height()); | ||
693 | xcb_connection_t *c = connection(); | 693 | xcb_connection_t *c = connection(); | ||
694 | xcb_shape_combine(c, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_INPUT, XCB_SHAPE_SK_BOUNDING, | 694 | xcb_shape_combine(c, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_INPUT, XCB_SHAPE_SK_BOUNDING, | ||
695 | shape_helper_window, 0, 0, frameId()); | 695 | shape_helper_window, 0, 0, frameId()); | ||
696 | xcb_shape_combine(c, XCB_SHAPE_SO_SUBTRACT, XCB_SHAPE_SK_INPUT, XCB_SHAPE_SK_BOUNDING, | 696 | xcb_shape_combine(c, XCB_SHAPE_SO_SUBTRACT, XCB_SHAPE_SK_INPUT, XCB_SHAPE_SK_BOUNDING, | ||
697 | shape_helper_window, clientPos().x(), clientPos().y(), window()); | 697 | shape_helper_window, Xcb::scX(clientPos().x()), Xcb::scX(clientPos().y()), window()); | ||
698 | xcb_shape_combine(c, XCB_SHAPE_SO_UNION, XCB_SHAPE_SK_INPUT, XCB_SHAPE_SK_INPUT, | 698 | xcb_shape_combine(c, XCB_SHAPE_SO_UNION, XCB_SHAPE_SK_INPUT, XCB_SHAPE_SK_INPUT, | ||
699 | shape_helper_window, clientPos().x(), clientPos().y(), window()); | 699 | shape_helper_window, Xcb::scX(clientPos().x()), Xcb::scX(clientPos().y()), window()); | ||
700 | xcb_shape_combine(c, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_INPUT, XCB_SHAPE_SK_INPUT, | 700 | xcb_shape_combine(c, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_INPUT, XCB_SHAPE_SK_INPUT, | ||
701 | frameId(), 0, 0, shape_helper_window); | 701 | frameId(), 0, 0, shape_helper_window); | ||
702 | } | 702 | } | ||
703 | } | 703 | } | ||
704 | 704 | | |||
705 | void Client::hideClient(bool hide) | 705 | void Client::hideClient(bool hide) | ||
706 | { | 706 | { | ||
707 | if (hidden == hide) | 707 | if (hidden == hide) | ||
▲ Show 20 Lines • Show All 1428 Lines • Show Last 20 Lines |