Hello community,
here is the log from the commit of package compiz
checked in at Sun May 7 15:50:01 CEST 2006.
--------
--- compiz/compiz.changes 2006-05-03 00:17:24.000000000 +0200
+++ STABLE/compiz/compiz.changes 2006-05-03 17:04:35.000000000 +0200
@@ -1,0 +2,9 @@
+Wed May 3 16:59:21 CEST 2006 - dreveman@suse.de
+
+- Fix unminimize to maximized window. (bnc 171465)
+- When a window is activated, move to cube side that contains the
+ biggest part of the window. (bnc 152677)
+- Don't constrain the cursor when moving and resizing. Fixes some
+ issues with the maximize snap-off feature.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ compiz.spec ++++++
--- /var/tmp/diff_new_pack.XTgmyI/_old 2006-05-07 15:49:30.000000000 +0200
+++ /var/tmp/diff_new_pack.XTgmyI/_new 2006-05-07 15:49:30.000000000 +0200
@@ -18,7 +18,7 @@
Requires: libpng libdrm gconf2 gtk2 gnome-desktop control-center2 libsvg libsvg-cairo libwnck
Autoreqprov: on
Version: cvs_060503
-Release: 1
+Release: 4
Summary: OpenGL window and compositing manager.
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64 ppc ppc64 ia64
@@ -134,6 +134,12 @@
%changelog -n compiz
* Wed May 03 2006 - dreveman@suse.de
+- Fix unminimize to maximized window. (bnc 171465)
+- When a window is activated, move to cube side that contains the
+ biggest part of the window. (bnc 152677)
+- Don't constrain the cursor when moving and resizing. Fixes some
+ issues with the maximize snap-off feature.
+* Wed May 03 2006 - dreveman@suse.de
- Fix major window stacking order bug.
- Make sure cube unfolds completely when using the unfold feature.
- Update to final enums for GLX_EXT_texture_from_pixmap.
++++++ compiz-0.0.10.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.10/ChangeLog new/compiz-0.0.10/ChangeLog
--- old/compiz-0.0.10/ChangeLog 2006-05-02 23:25:14.000000000 +0200
+++ new/compiz-0.0.10/ChangeLog 2006-05-03 16:51:44.000000000 +0200
@@ -1,3 +1,20 @@
+2006-05-03 David Reveman
+
+ * plugins/move.c:
+ * plugins/resize.c (resizeHandleMotionEvent): Don't constrain the
+ cursor.
+
+ * plugins/rotate.c (rotateHandleEvent): Use defaultViewportForWindow
+ to figure out which viewport we should move to. (bnc 152677)
+
+ * src/window.c (addWindowSizeChanges): Offset x coordinate with
+ default viewport coordinate. (bnc 171465)
+ (updateWindowAttributes): Always add windows size changes. (bnc 171465)
+
+ * include/compiz.h:
+ * src/window.c (defaultViewportForWindow): Add defaultViewportForWindow
+ function that computes the default viewport for a window.
+
2006-05-02 David Reveman
* plugins/cube.c (cubePaintTransformedScreen): Bump up size a bit more
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.10/include/compiz.h new/compiz-0.0.10/include/compiz.h
--- old/compiz-0.0.10/include/compiz.h 2006-05-02 14:48:49.000000000 +0200
+++ new/compiz-0.0.10/include/compiz.h 2006-05-03 13:55:09.000000000 +0200
@@ -1828,6 +1828,9 @@
void
redirectWindow (CompWindow *w);
+int
+defaultViewportForWindow (CompWindow *w);
+
/* plugin.c */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.10/plugins/move.c new/compiz-0.0.10/plugins/move.c
--- old/compiz-0.0.10/plugins/move.c 2006-04-29 21:00:39.000000000 +0200
+++ new/compiz-0.0.10/plugins/move.c 2006-05-03 16:41:34.000000000 +0200
@@ -67,6 +67,8 @@
HandleEventProc handleEvent;
CompWindow *w;
+ int x;
+ int y;
KeyCode key[NUM_KEYS];
} MoveDisplay;
@@ -226,6 +228,8 @@
return;
md->w = w;
+ md->x = 0;
+ md->y = 0;
lastPointerX = x;
lastPointerY = y;
@@ -277,28 +281,26 @@
if (ms->grabIndex)
{
CompWindow *w;
- int pointerDx, pointerDy, dx, dy, wx, wy;
- Bool move = TRUE;
- Bool warp = TRUE;
+ int dx, dy;
MOVE_DISPLAY (s->display);
w = md->w;
- pointerDx = xRoot - lastPointerX;
- pointerDy = yRoot - lastPointerY;
+ md->x += xRoot - lastPointerX;
+ md->y += yRoot - lastPointerY;
if (w->type & CompWindowTypeFullscreenMask)
{
- wx = wy = dx = dy = 0;
+ dx = dy = 0;
}
else
{
unsigned int state = w->state;
int min, max;
- wx = dx = pointerDx;
- wy = dy = pointerDy;
+ dx = md->x;
+ dy = md->y;
if (ms->opt[MOVE_SCREEN_OPTION_CONSTRAIN_Y].value.b)
{
@@ -309,17 +311,12 @@
dy = min - w->attrib.y;
else if (w->attrib.y + dy > max)
dy = max - w->attrib.y;
-
- wy = dy;
}
if (ms->opt[MOVE_SCREEN_OPTION_SNAPOFF_MAXIMIZED].value.b)
{
- if ((w->state & CompWindowStateMaximizedVertMask) &&
- (w->state & CompWindowStateMaximizedHorzMask))
+ if (w->state & CompWindowStateMaximizedVertMask)
{
- warp = FALSE;
-
if (yRoot - ms->snapOffY >= SNAP_OFF)
{
w->saveMask |= CWX | CWY;
@@ -327,11 +324,13 @@
w->saveWc.x = xRoot - (w->saveWc.width >> 1);
w->saveWc.y = yRoot + (w->input.top >> 1);
- move = FALSE;
+ md->x = md->y = 0;
unmaximizeWindow (w);
ms->snapOffY = ms->snapBackY;
+
+ return;
}
}
else if ((ms->origState & CompWindowStateMaximizedVertMask) &&
@@ -341,16 +340,16 @@
{
if (!otherScreenGrabExist (s, "move", 0))
{
+ int wy;
+
maximizeWindow (w);
wy = s->workArea.y + (w->input.top >> 1);
wy += w->sizeHints.height_inc >> 1;
- wy -= lastPointerY;
- if (wy > 0)
- wy = 0;
+ warpPointer (s->display, 0, wy - pointerY);
- move = FALSE;
+ return;
}
}
}
@@ -362,13 +361,10 @@
max = s->workArea.y + s->workArea.height -
w->input.bottom - w->height;
- if (w->attrib.y + pointerDy < min)
+ if (w->attrib.y + dy < min)
dy = min - w->attrib.y;
- else if (w->attrib.y + pointerDy > max)
+ else if (w->attrib.y + dy > max)
dy = max - w->attrib.y;
-
- if (warp)
- wy = dy;
}
if (state & CompWindowStateMaximizedHorzMask)
@@ -380,23 +376,17 @@
max = s->workArea.x + s->workArea.width -
w->input.right - w->width;
- if (w->attrib.x + pointerDx < min)
+ if (w->attrib.x + dx < min)
dx = min - w->attrib.x;
- else if (w->attrib.x + pointerDx > max)
+ else if (w->attrib.x + dx > max)
dx = max - w->attrib.x;
-
- if (warp)
- wx = dx;
}
}
- if (move)
- moveWindow (md->w, dx, dy, TRUE, FALSE);
+ moveWindow (md->w, dx, dy, TRUE, FALSE);
- if (wx != pointerDx || wy != pointerDy)
- warpPointer (s->display,
- (lastPointerX + wx) - pointerX,
- (lastPointerY + wy) - pointerY);
+ md->x -= dx;
+ md->y -= dy;
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.10/plugins/resize.c new/compiz-0.0.10/plugins/resize.c
--- old/compiz-0.0.10/plugins/resize.c 2006-04-30 05:15:30.000000000 +0200
+++ new/compiz-0.0.10/plugins/resize.c 2006-05-03 16:43:50.000000000 +0200
@@ -409,7 +409,7 @@
if (pointerDx || pointerDy)
{
- int w, h, dx, dy;
+ int w, h;
w = rd->width;
h = rd->height;
@@ -426,29 +426,10 @@
resizeConstrainMinMax (rd->w, w, h, &w, &h);
- if (rd->mask & ResizeLeftMask)
- dx = rd->width - w;
- else if (rd->mask & ResizeRightMask)
- dx = w - rd->width;
- else
- dx = 0;
-
- if (rd->mask & ResizeUpMask)
- dy = rd->height - h;
- else if (rd->mask & ResizeDownMask)
- dy = h - rd->height;
- else
- dy = 0;
-
rd->width = w;
rd->height = h;
resizeUpdateWindowSize (s->display);
-
- if (dx != pointerDx || dy != pointerDy)
- warpPointer (s->display,
- (lastPointerX + dx) - pointerX,
- (lastPointerY + dy) - pointerY);
}
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.10/plugins/rotate.c new/compiz-0.0.10/plugins/rotate.c
--- old/compiz-0.0.10/plugins/rotate.c 2006-04-30 02:29:06.000000000 +0200
+++ new/compiz-0.0.10/plugins/rotate.c 2006-05-03 14:47:06.000000000 +0200
@@ -1177,6 +1177,8 @@
w = findWindowAtDisplay (d, event->xclient.window);
if (w)
{
+ int dx;
+
ROTATE_SCREEN (w->screen);
s = w->screen;
@@ -1188,20 +1190,16 @@
rs->moving = FALSE;
rs->moveTo = 0.0f;
- if (w->attrib.x >= s->width || w->attrib.x + w->width <= 0)
+ dx = defaultViewportForWindow (w) - s->x;
+ if (dx)
{
Window win;
- int i, x, y, dx;
+ int i, x, y;
unsigned int ui;
XQueryPointer (d->display, s->root,
&win, &win, &x, &y, &i, &i, &ui);
- if (w->attrib.x >= s->width)
- dx = w->attrib.x / s->width;
- else
- dx = ((w->attrib.x + w->width) / s->width) - 1;
-
if (dx > (s->size + 1) / 2)
dx -= s->size;
else if (dx < -(s->size + 1) / 2)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.10/src/window.c new/compiz-0.0.10/src/window.c
--- old/compiz-0.0.10/src/window.c 2006-05-02 15:50:45.000000000 +0200
+++ new/compiz-0.0.10/src/window.c 2006-05-03 14:24:27.000000000 +0200
@@ -2747,12 +2747,13 @@
XWindowChanges *xwc)
{
int mask = 0;
+ int x;
+
+ x = (defaultViewportForWindow (w) - w->screen->x) * w->screen->width;
if (w->type & CompWindowTypeFullscreenMask)
{
- saveWindowGeometry (w,
- CWX | CWY | CWWidth | CWHeight |
- CWBorderWidth);
+ saveWindowGeometry (w, CWX | CWY | CWWidth | CWHeight | CWBorderWidth);
xwc->width = w->screen->width;
xwc->height = w->screen->height;
@@ -2797,7 +2798,7 @@
{
if (w->type & CompWindowTypeFullscreenMask)
{
- xwc->x = 0;
+ xwc->x = x;
xwc->y = 0;
mask |= CWX | CWY;
@@ -2842,16 +2843,16 @@
if (w->state & CompWindowStateMaximizedHorzMask)
{
- if (w->attrib.x < w->screen->workArea.x + w->input.left)
+ if (w->attrib.x < x + w->screen->workArea.x + w->input.left)
{
- xwc->x = w->screen->workArea.x + w->input.left;
+ xwc->x = x + w->screen->workArea.x + w->input.left;
mask |= CWX;
}
else
{
width = xwc->width + w->attrib.border_width * 2;
- max = w->screen->workArea.x + w->screen->workArea.width;
+ max = x + w->screen->workArea.x + w->screen->workArea.width;
if (w->attrib.x + width + w->input.right > max)
{
xwc->x = max - width - w->input.right;
@@ -3008,13 +3009,8 @@
if (w->state & CompWindowStateHiddenMask)
return;
- mask = addWindowStackChanges (w, &xwc, findSiblingBelow (w, aboveFs));
-
- /* only update fullscreen and maximized size if window is visible on
- current viewport. Size is updated once we switch to the windows
- viewport. */
- if (w->attrib.x < w->screen->width && w->attrib.x + w->width > 0)
- mask |= addWindowSizeChanges (w, &xwc);
+ mask = addWindowStackChanges (w, &xwc, findSiblingBelow (w, aboveFs));
+ mask |= addWindowSizeChanges (w, &xwc);
if (!mask)
return;
@@ -3504,3 +3500,25 @@
w->redirected = TRUE;
w->screen->overlayWindowCount--;
}
+
+/* Returns the current viewport for a window. If the window spans more than
+ one viewport the most appropriate viewport is returned. How the most
+ appropriate viewport is computed can be made optional if necessary. It is
+ currently computed as the viewport where the center of the window is
+ located, except for when the window is visible in the current viewport as
+ the current viewport is then always returned. */
+int
+defaultViewportForWindow (CompWindow *w)
+{
+ CompScreen *s = w->screen;
+ int x;
+
+ if (w->attrib.x < s->width && w->attrib.x + w->width > 0)
+ return s->x;
+
+ x = w->attrib.x + (w->width >> 1);
+ if (x < 0)
+ return s->x + ((x / s->width) - 1) % s->size;
+ else
+ return s->x + (x / s->width) % s->size;
+}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...