-void Actions::insertPress(const XButtonEvent &e)
-{
- ButtonPressAction *a = _posqueue[BUTTONS - 1];
- // rm'd the last one, shift them all down one
- for (int i = BUTTONS-1; i > 0; --i) {
- _posqueue[i] = _posqueue[i-1];
- }
- _posqueue[0] = a;
- a->button = e.button;
- a->pos = otk::Point(e.x_root, e.y_root);
-
- Client *c = openbox->findClient(e.window);
- if (c) a->clientarea = c->area();
-}
-
-void Actions::removePress(const XButtonEvent &e)
-{
- int i;
- ButtonPressAction *a = 0;
- for (i=0; i<BUTTONS-1; ++i)
- if (_posqueue[i]->button == e.button) {
- a = _posqueue[i];
- break;
- }
- if (a) { // found one, remove it and shift the rest up one
- for (; i < BUTTONS-1; ++i)
- _posqueue[i] = _posqueue[i+1];
- _posqueue[BUTTONS-1] = a;
- }
- _posqueue[BUTTONS-1]->button = 0;
-}
-