| src/Frame.cc | |
| 391 | @@ -391,17 +391,17 @@ |
| 391 | |
| 392 | // END - PWinObj interface. |
| 393 | |
| 394 | #ifdef HAVE_SHAPE |
| 395 | //! @brief |
| 396 | void |
| 397 | Frame::handleShapeEvent(XAnyEvent *ev) |
| 398 | { |
| 399 | #ifdef HAVE_SHAPE |
| 400 | if (! _client || (ev->window != _client->getWindow())) { |
| 401 | return; |
| 402 | } |
| 403 | _client->setShaped(setShape()); |
| 404 | } |
| 405 | #endif // HAVE_SHAPE |
| 406 | } |
| 407 | |
| 408 | |
| 409 | // START - PDecor interface. |
| 410 | |
| ... | |
| 460 | @@ -460,11 +460,9 @@ |
| 460 | |
| 461 | // setShape uses current active child, so we need to activate the |
| 462 | // child before setting shape |
| 463 | #ifdef HAVE_SHAPE |
| 464 | if (PScreen::instance()->hasExtensionShape()) { |
| 465 | _client->setShaped(setShape()); |
| 466 | } |
| 467 | #endif // HAVE_SHAPE |
| 468 | |
| 469 | if (_focused) { |
| 470 | child->giveInputFocus(); |
| ... | |
| src/Frame.hh | |
| 50 | @@ -50,9 +50,7 @@ |
| 50 | virtual ActionEvent *handleUnmapEvent(XUnmapEvent *ev); |
| 51 | // END - PWinObj interface. |
| 52 | |
| 53 | #ifdef HAVE_SHAPE |
| 54 | virtual void handleShapeEvent(XAnyEvent *ev); |
| 55 | #endif // HAVE_SHAPE |
| 56 | |
| 57 | // START - PDecor interface. |
| 58 | virtual void addChild(PWinObj *child, std::list<PWinObj*>::iterator *it = 0); |
| ... | |
| src/PDecor.cc | |
| 128 | @@ -128,7 +128,7 @@ |
| 128 | XShapeCombineRectangles(_dpy, _window, ShapeBounding, |
| 129 | 0, 0, &rect, 1, ShapeSet, YXBanded); |
| 130 | } |
| 131 | #endif |
| 132 | #endif // HAVE_SHAPE |
| 133 | clear(); |
| 134 | } |
| 135 | } |
| ... | |
| src/Client.cc | |
| 65 | @@ -65,10 +65,7 @@ |
| 65 | _alive(false), _marked(false), |
| 66 | _send_focus_message(false), _send_close_message(false), |
| 67 | _wm_hints_input(true), _cfg_request_lock(false), |
| 68 | #ifdef HAVE_SHAPE |
| 69 | _shaped(false), |
| 70 | #endif // HAVE_SHAPE |
| 71 | _extended_net_name(false) |
| 72 | _shaped(false), _extended_net_name(false) |
| 73 | { |
| 74 | // Construct the client |
| 75 | PScreen::instance()->grabServer(); |
| ... | |
| 83 | @@ -86,11 +83,11 @@ |
| 83 | _title.setId(_id); |
| 84 | _title.infoAdd(PDecor::TitleItem::INFO_ID); |
| 85 | |
| 89 | #ifdef HAVE_SHAPE |
| 87 | if (PScreen::instance()->hasExtensionShape()) { |
| 88 | #ifdef HAVE_SHAPE |
| 89 | XShapeSelectInput(_dpy, _window, ShapeNotifyMask); |
| 93 | } |
| 91 | #endif // HAVE_SHAPE |
| 92 | } |
| 93 | |
| 94 | XAddToSaveSet(_dpy, _window); |
| 95 | XSetWindowBorderWidth(_dpy, _window, 0); |
| ... | |
| src/Client.hh | |
| 140 | @@ -140,9 +140,7 @@ |
| 140 | |
| 141 | inline bool hasTitlebar(void) const { return (_state.decor&DECOR_TITLEBAR); } |
| 142 | inline bool hasBorder(void) const { return (_state.decor&DECOR_BORDER); } |
| 143 | #ifdef HAVE_SHAPE |
| 144 | inline bool isShaped(void) const { return _shaped; } |
| 145 | #endif // HAVE_SHAPE |
| 146 | inline bool hasStrut(void) const { return (_strut); } |
| 147 | |
| 148 | PTexture *getIcon(void) const { return _icon; } |
| ... | |
| 223 | @@ -225,10 +223,8 @@ |
| 223 | } |
| 224 | |
| 225 | /** Set shaped flag on Client. */ |
| 228 | inline void setShaped(bool s) { |
| 229 | #ifdef HAVE_SHAPE |
| 230 | _shaped = s; |
| 231 | #endif // HAVE_SHAPE |
| 230 | inline void setShaped(bool shaped) { |
| 231 | _shaped = shaped; |
| 232 | } |
| 233 | |
| 234 | void close(void); |
| ... | |
| 332 | @@ -336,9 +332,7 @@ |
| 332 | bool _alive, _marked; |
| 333 | bool _send_focus_message, _send_close_message, _wm_hints_input; |
| 334 | bool _cfg_request_lock; |
| 339 | #ifdef HAVE_SHAPE |
| 336 | bool _shaped; |
| 341 | #endif // HAVE_SHAPE |
| 338 | bool _extended_net_name; |
| 339 | |
| 340 | class State { |
| ... | |
| src/WindowManager.cc | |
| 1475 | @@ -1475,17 +1475,18 @@ |
| 1475 | } |
| 1476 | } |
| 1477 | |
| 1478 | #ifdef HAVE_SHAPE |
| 1479 | |
| 1480 | //! @brief Handle shape events applying shape to clients |
| 1481 | void |
| 1482 | WindowManager::handleShapeEvent(XAnyEvent *ev) |
| 1483 | { |
| 1484 | #ifdef HAVE_SHAPE |
| 1485 | Client *client = Client::findClient(ev->window); |
| 1486 | if (client && client->getParent()) { |
| 1487 | static_cast<Frame*>(client->getParent())->handleShapeEvent(ev); |
| 1488 | } |
| 1489 | } |
| 1490 | #endif // HAVE_SHAPE |
| 1491 | } |
| 1492 | |
| 1493 | #ifdef HAVE_XRANDR |
| 1494 | //! @brief Handles XRandr events |
| ... | |
| src/WindowManager.hh | |
| 214 | @@ -214,9 +214,7 @@ |
| 214 | void handleFocusInEvent(XFocusChangeEvent *ev); |
| 215 | void handleFocusOutEvent(XFocusChangeEvent *ev); |
| 216 | |
| 217 | #ifdef HAVE_SHAPE |
| 218 | void handleShapeEvent(XAnyEvent *ev); |
| 219 | #endif // HAVE_SHAPE |
| 220 | |
| 221 | #ifdef HAVE_XRANDR |
| 222 | void handleXRandrEvent(XRRNotifyEvent *ev); |
| ... | |
| src/PScreen.hh | |
| 154 | @@ -154,10 +154,8 @@ |
| 154 | inline uint getNumLock(void) const { return _num_lock; } |
| 155 | inline uint getScrollLock(void) const { return _scroll_lock; } |
| 156 | |
| 157 | #ifdef HAVE_SHAPE |
| 158 | inline bool hasExtensionShape(void) const { return _has_extension_shape; } |
| 159 | inline int getEventShape(void) const { return _event_shape; } |
| 160 | #endif // HAVE_SHAPE |
| 161 | |
| 162 | void updateGeometry(uint width, uint height); |
| 163 | #ifdef HAVE_XRANDR |
| ... | |