summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-12-28 19:07:22 +0100
committerDanny Baumann <dannybaumann@web.de>2008-12-28 19:07:22 +0100
commit0730e4edc38e065156b0184af7ef0140523e7125 (patch)
tree7a231b99732a17c20913c58a0c11d362813b8187
parent537474d1aa5ba7fa41f7ec1251e17f175d3b73fd (diff)
downloadextrawm-compiz-0.8.tar.gz
extrawm-compiz-0.8.tar.bz2
Revert "Added shortcut to move window to another (next, or arbitrary via dbus) output device."compiz-0.8
This reverts commit 537474d1aa5ba7fa41f7ec1251e17f175d3b73fd. This functionality was added to the put plugin.
-rw-r--r--extrawm.c105
-rw-r--r--extrawm.xml.in4
2 files changed, 0 insertions, 109 deletions
diff --git a/extrawm.c b/extrawm.c
index 4910326..8d4c721 100644
--- a/extrawm.c
+++ b/extrawm.c
@@ -144,110 +144,6 @@ activateDemandsAttention (CompDisplay *d,
}
static Bool
-sendToNextOutput (CompDisplay *d,
- CompAction *action,
- CompActionState state,
- CompOption *option,
- int nOption)
-{
- CompWindow *w;
- Window xid;
-
- xid = getIntOptionNamed (option, nOption, "window", 0);
- w = findWindowAtDisplay (d, xid);
-
- if (w)
- {
- CompScreen *s = w->screen;
- int outputNum, currentNum;
- CompOutput *currentOutput, *newOutput;
- int dx, dy;
-
- currentNum = outputDeviceForWindow (w);
- outputNum = getIntOptionNamed (option, nOption, "output",
- (currentNum + 1) % s->nOutputDev);
-
- if (outputNum >= s->nOutputDev)
- return FALSE;
-
- currentOutput = &s->outputDev[currentNum];
- newOutput = &s->outputDev[outputNum];
-
- /* move by the distance of the output center points */
- dx = (newOutput->region.extents.x1 + newOutput->width / 2) -
- (currentOutput->region.extents.x1 + currentOutput->width / 2);
- dy = (newOutput->region.extents.y1 + newOutput->height / 2) -
- (currentOutput->region.extents.y1 + currentOutput->height / 2);
-
- if (dx || dy)
- {
- /* constrain to work area of new output and move */
- CompWindowExtents newExtents;
- XRectangle *workArea = &newOutput->workArea;
- XWindowChanges xwc;
- int width, height;
- unsigned int mask = 0;
-
- newExtents.left = w->serverX + dx - w->input.left;
- newExtents.right = w->serverX + dx +
- w->serverWidth + w->input.right;
- newExtents.top = w->serverY + dy - w->input.top;
- newExtents.bottom = w->serverY + dy +
- w->serverHeight + w->input.bottom;
-
- width = newExtents.right - newExtents.left;
- height = newExtents.bottom - newExtents.top;
-
- if (newExtents.left < workArea->x)
- {
- dx += workArea->x - newExtents.left;
- }
- else if (width <= workArea->width &&
- newExtents.right > workArea->x + workArea->width)
- {
- dx += workArea->x + workArea->width - newExtents.right;
- }
-
- if (newExtents.top < workArea->y)
- {
- dy += workArea->y - newExtents.top;
- }
- else if (height <= workArea->height &&
- newExtents.bottom > workArea->y + workArea->height)
- {
- dy += workArea->y + workArea->width - newExtents.right;
- }
-
- if (dx)
- {
- xwc.x = w->serverX + dx;
- mask |= CWX;
- }
-
- if (dy)
- {
- xwc.y = w->serverY + dy;
- mask |= CWY;
- }
-
- if (mask)
- configureXWindow (w, mask, &xwc);
-
- if (w->state & (MAXIMIZE_STATE | CompWindowStateFullscreenMask))
- updateWindowAttributes (w, CompStackingUpdateModeNone);
-
- /* make sure the window keeps focus */
- if (d->activeWindow == w->id)
- sendWindowActivationRequest (s, w->id);
- }
-
- return TRUE;
- }
-
- return FALSE;
-}
-
-static Bool
activateWin (CompDisplay *d,
CompAction *action,
CompActionState state,
@@ -462,7 +358,6 @@ extraWMInitDisplay (CompPlugin *p,
extrawmSetToggleFullscreenKeyInitiate (d, toggleFullscreen);
extrawmSetActivateInitiate (d, activateWin);
extrawmSetActivateDemandsAttentionKeyInitiate (d, activateDemandsAttention);
- extrawmSetToNextOutputKeyInitiate (d, sendToNextOutput);
WRAP (ed, d, handleEvent, extraWMHandleEvent);
diff --git a/extrawm.xml.in b/extrawm.xml.in
index 20bc105..7b7397e 100644
--- a/extrawm.xml.in
+++ b/extrawm.xml.in
@@ -29,10 +29,6 @@
<_short>Activate Demanding Attention Window</_short>
<_long>Activate next window which has the "demands attention" flag set.</_long>
</option>
- <option name="to_next_output_key" type="key">
- <_short>Move Window To Next Output</_short>
- <_long>Move the selected window to the next output device.</_long>
- </option>
</display>
</plugin>
</compiz>