rpms/compiz/devel compiz.spec,1.30,1.31 plane.patch,1.1,1.2
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Tue Sep 5 19:20:42 UTC 2006
Author: sandmann
Update of /cvs/dist/rpms/compiz/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv9722
Modified Files:
compiz.spec plane.patch
Log Message:
Fix vertical viewport support in plane patch
Index: compiz.spec
===================================================================
RCS file: /cvs/dist/rpms/compiz/devel/compiz.spec,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- compiz.spec 1 Sep 2006 19:52:25 -0000 1.30
+++ compiz.spec 5 Sep 2006 19:20:36 -0000 1.31
@@ -152,6 +152,9 @@
%{_includedir}/compiz
%changelog
+* Tue Sep 5 2006 Soren Sandmann <sandmann at redhat.com> - 0.0.13-0.24.20060817git.fc6
+- Fix vertical viewport support in the plane patch.
+
* Fri Sep 1 2006 Soren Sandmann <sandmann at redhat.com> - 0.0.13-0.23.20060817git.fc6
- Upgrade to 0.6.61 of the dialog
plane.patch:
include/compiz.h | 17
plugins/Makefile.am | 5
plugins/cube.c | 66 +--
plugins/place.c | 13
plugins/plane.c | 922 ++++++++++++++++++++++++++++++++++++++++++++++++++++
plugins/rotate.c | 57 +--
src/event.c | 3
src/screen.c | 148 +++++---
src/window.c | 72 ++--
9 files changed, 1158 insertions(+), 145 deletions(-)
Index: plane.patch
===================================================================
RCS file: /cvs/dist/rpms/compiz/devel/plane.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- plane.patch 1 Sep 2006 18:24:39 -0000 1.1
+++ plane.patch 5 Sep 2006 19:20:37 -0000 1.2
@@ -1,5 +1,5 @@
---- compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/plugins/Makefile.am.plane 2006-09-01 14:09:17.000000000 -0400
-+++ compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/plugins/Makefile.am 2006-09-01 14:09:44.000000000 -0400
+--- compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/plugins/Makefile.am.plane 2006-08-17 17:36:07.000000000 -0400
++++ compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/plugins/Makefile.am 2006-09-05 13:45:56.000000000 -0400
@@ -46,6 +46,10 @@
libwater_la_LIBADD = @COMPIZ_LIBS@
libwater_la_SOURCES = water.c
@@ -19,8 +19,58 @@
$(libgconf_dump_module)
EXTRA_DIST = $(schema_in_files)
+--- compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/plugins/place.c.plane 2006-09-05 13:51:49.000000000 -0400
++++ compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/plugins/place.c 2006-09-05 13:52:50.000000000 -0400
+@@ -593,8 +593,10 @@
+ getOuterRectOfWindow (window, &rect);
+
+ work_area = window->screen->workArea;
+- work_area.x += (window->initialViewport - window->screen->x) *
++ work_area.x += (window->initialViewportX - window->screen->x) *
+ window->screen->width;
++ work_area.y += (window->initialViewportY - window->screen->y) *
++ window->screen->height;
+
+ center_tile_rect_in_area (&rect, &work_area);
+
+@@ -678,13 +680,16 @@
+ CompWindow *wi;
+ GList *windows;
+ XRectangle work_area;
+- int x0 = (window->initialViewport - window->screen->x) *
++ int x0 = (window->initialViewportX - window->screen->x) *
+ window->screen->width;
++ int y0 = (window->initialViewportY - window->screen->y) *
++ window->screen->height;
+
+ PLACE_SCREEN (window->screen);
+
+ work_area = window->screen->workArea;
+ work_area.x += x0;
++ work_area.y += y0;
+
+ windows = NULL;
+
+@@ -718,7 +723,7 @@
+ if (window->type & CompWindowTypeFullscreenMask)
+ {
+ x = x0;
+- y = 0;
++ y = y0;
+ goto done_no_constraints;
+ }
+
+@@ -878,7 +883,7 @@
+
+ /* "Origin" placement algorithm */
+ x = x0;
+- y = 0;
++ y = y0;
+
+ if (find_first_fit (window, windows, x, y, &x, &y))
+ goto done_check_denied_focus;
--- compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/plugins/rotate.c.plane 2006-08-17 17:36:07.000000000 -0400
-+++ compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/plugins/rotate.c 2006-09-01 14:05:12.000000000 -0400
++++ compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/plugins/rotate.c 2006-09-05 13:45:56.000000000 -0400
@@ -419,15 +419,15 @@
rs->xrot += rs->xVelocity * chunk;
rs->yrot += rs->yVelocity * chunk;
@@ -169,8 +219,8 @@
o[0].type = CompOptionTypeInt;
o[0].name = "x";
--- /dev/null 2006-08-31 19:15:36.944167750 -0400
-+++ compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/plugins/plane.c 2006-09-01 14:05:12.000000000 -0400
-@@ -0,0 +1,923 @@
++++ compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/plugins/plane.c 2006-09-05 13:45:56.000000000 -0400
+@@ -0,0 +1,922 @@
+/*
+ * Copyright © 2006 Red Hat, Inc.
+ *
@@ -551,7 +601,6 @@
+ Region region,
+ unsigned int mask)
+{
-+ ScreenPaintAttrib sa = *sAttrib;
+ Bool status;
+
+ PLANE_SCREEN (s);
@@ -1094,8 +1143,8 @@
+{
+ return &planeVTable;
+}
---- compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/plugins/cube.c.plane 2006-09-01 14:05:12.000000000 -0400
-+++ compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/plugins/cube.c 2006-09-01 14:05:12.000000000 -0400
+--- compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/plugins/cube.c.plane 2006-09-05 13:45:56.000000000 -0400
++++ compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/plugins/cube.c 2006-09-05 13:45:56.000000000 -0400
@@ -741,7 +741,7 @@
case CUBE_SCREEN_OPTION_IN:
if (compSetBoolOption (o, value))
@@ -1277,9 +1326,19 @@
return FALSE;
if (cs->imgNFile)
---- compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/include/compiz.h.plane 2006-09-01 14:05:12.000000000 -0400
-+++ compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/include/compiz.h 2006-09-01 14:05:12.000000000 -0400
-@@ -1281,7 +1281,9 @@
+--- compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/include/compiz.h.plane 2006-09-05 13:45:56.000000000 -0400
++++ compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/include/compiz.h 2006-09-05 13:45:56.000000000 -0400
+@@ -1232,7 +1232,8 @@
+ typedef struct _CompStartupSequence {
+ struct _CompStartupSequence *next;
+ SnStartupSequence *sequence;
+- unsigned int viewport;
++ unsigned int viewportX;
++ unsigned int viewportY;
+ } CompStartupSequence;
+
+ typedef struct _CompFBConfig {
+@@ -1281,7 +1282,9 @@
int width;
int height;
int x;
@@ -1290,7 +1349,7 @@
REGION region;
Region damage;
unsigned long damageMask;
-@@ -1541,6 +1543,7 @@
+@@ -1541,6 +1544,7 @@
void
moveScreenViewport (CompScreen *s,
int tx,
@@ -1298,7 +1357,17 @@
Bool sync);
void
-@@ -2010,8 +2013,10 @@
+@@ -1670,7 +1674,8 @@
+ int destroyRefCnt;
+ int unmapRefCnt;
+
+- unsigned int initialViewport;
++ unsigned int initialViewportX;
++ unsigned int initialViewportY;
+
+ Bool placed;
+ Bool minimized;
+@@ -2010,8 +2015,10 @@
void
redirectWindow (CompWindow *w);
@@ -1311,8 +1380,20 @@
CompIcon *
getWindowIcon (CompWindow *w,
---- compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/src/screen.c.plane 2006-09-01 14:05:12.000000000 -0400
-+++ compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/src/screen.c 2006-09-01 14:05:12.000000000 -0400
+--- compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/src/event.c.plane 2006-09-05 13:48:54.000000000 -0400
++++ compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/src/event.c 2006-09-05 13:49:20.000000000 -0400
+@@ -1763,7 +1763,8 @@
+
+ if (!(w->state & CompWindowStateHiddenMask))
+ {
+- w->initialViewport = w->screen->x;
++ w->initialViewportX = w->screen->x;
++ w->initialViewportY = w->screen->y;
+
+ applyStartupProperties (w->screen, w);
+
+--- compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/src/screen.c.plane 2006-09-05 13:45:56.000000000 -0400
++++ compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/src/screen.c 2006-09-05 13:45:56.000000000 -0400
@@ -104,19 +104,21 @@
static void
@@ -1354,7 +1435,17 @@
return TRUE;
}
break;
-@@ -826,22 +831,25 @@
+@@ -352,7 +357,8 @@
+
+ s->next = screen->startupSequences;
+ s->sequence = sequence;
+- s->viewport = screen->x;
++ s->viewportX = screen->x;
++ s->viewportY = screen->y;
+
+ screen->startupSequences = s;
+
+@@ -826,22 +832,25 @@
{
memcpy (data, propData, sizeof (unsigned long));
@@ -1384,7 +1475,7 @@
XChangeProperty (d->display, s->root, d->desktopGeometryAtom,
XA_CARDINAL, 32, PropModeReplace,
-@@ -865,7 +873,7 @@
+@@ -865,7 +874,7 @@
d->showingDesktopAtom, 0L, 1L, FALSE,
XA_CARDINAL, &actual, &format,
&n, &left, &propData);
@@ -1393,7 +1484,7 @@
if (result == Success && n && propData)
{
memcpy (data, propData, sizeof (unsigned long));
-@@ -956,8 +964,10 @@
+@@ -956,8 +965,10 @@
if (!s->damage)
return FALSE;
@@ -1406,7 +1497,7 @@
for (i = 0; i < SCREEN_EDGE_NUM; i++)
{
-@@ -2493,61 +2503,89 @@
+@@ -2493,61 +2504,87 @@
void
moveScreenViewport (CompScreen *s,
int tx,
@@ -1425,28 +1516,28 @@
- {
- CompWindow *w;
- int m, wx, vWidth = s->width * s->size;
--
-- s->x += tx;
+ ty = s->y - ty;
+ ty = MOD (ty, s->vsize);
+ ty -= s->y;
-- tx *= -s->width;
+- s->x += tx;
+ if (!tx && !ty)
+ return;
-- for (w = s->windows; w; w = w->next)
-- {
-- if (w->attrib.override_redirect)
-- continue;
+- tx *= -s->width;
+ s->x += tx;
+ s->y += ty;
-- if (w->type & (CompWindowTypeDesktopMask | CompWindowTypeDockMask))
+- for (w = s->windows; w; w = w->next)
+- {
+- if (w->attrib.override_redirect)
- continue;
+ tx *= -s->width;
+ ty *= -s->height;
+- if (w->type & (CompWindowTypeDesktopMask | CompWindowTypeDockMask))
+- continue;
+-
- if (w->state & CompWindowStateStickyMask)
- continue;
+ vWidth = s->width * s->hsize;
@@ -1526,8 +1617,6 @@
+ data[0] = s->x * s->width;
+ data[1] = s->y * s->height;
+
-+ printf ("new position: %d %d\n", data[0], data[1]);
-+
+ XChangeProperty (s->display->display, s->root,
+ s->display->desktopViewportAtom,
+ XA_CARDINAL, 32, PropModeReplace,
@@ -1535,7 +1624,7 @@
}
}
-@@ -2556,7 +2594,7 @@
+@@ -2556,7 +2593,7 @@
int x,
Bool sync)
{
@@ -1544,9 +1633,31 @@
x += w->screen->x * w->screen->width;
x = MOD (x, vWidth);
---- compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/src/window.c.plane 2006-09-01 14:05:12.000000000 -0400
-+++ compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/src/window.c 2006-09-01 14:05:12.000000000 -0400
-@@ -2903,9 +2903,13 @@
+@@ -2684,7 +2721,10 @@
+ }
+
+ if (s)
+- window->initialViewport = s->viewport;
++ {
++ window->initialViewportX = s->viewportX;
++ window->initialViewportY = s->viewportY;
++ }
+ }
+
+ void
+--- compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/src/window.c.plane 2006-09-05 13:45:56.000000000 -0400
++++ compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/src/window.c 2006-09-05 13:45:56.000000000 -0400
+@@ -1501,7 +1501,8 @@
+ w->shaded = FALSE;
+ w->hidden = FALSE;
+
+- w->initialViewport = screen->x;
++ w->initialViewportX = screen->x;
++ w->initialViewportY = screen->y;
+
+ w->pendingUnmaps = 0;
+
+@@ -2903,9 +2904,13 @@
int oldBorderWidth)
{
int mask = 0;
@@ -1562,7 +1673,7 @@
if (w->type & CompWindowTypeFullscreenMask)
{
-@@ -2969,7 +2973,7 @@
+@@ -2969,7 +2974,7 @@
if (w->type & CompWindowTypeFullscreenMask)
{
xwc->x = x;
@@ -1571,7 +1682,7 @@
mask |= CWX | CWY;
}
-@@ -2993,16 +2997,16 @@
+@@ -2993,16 +2998,16 @@
if (w->state & CompWindowStateMaximizedVertMask)
{
@@ -1591,7 +1702,7 @@
if (oldY + oldHeight + w->input.bottom > max)
{
xwc->y = max - height - w->input.bottom;
-@@ -3393,9 +3397,9 @@
+@@ -3393,9 +3398,9 @@
return;
x1 = w->screen->workArea.x - w->screen->width * w->screen->x;
@@ -1604,7 +1715,19 @@
if (w->attrib.x - w->input.left >= x2)
dx = (x2 - 25) - w->attrib.x;
-@@ -3880,20 +3884,44 @@
+@@ -3833,7 +3838,10 @@
+ CompWindowTypeDockMask))
+ return FALSE;
+
+- if (w->initialViewport != w->screen->x)
++ if (w->initialViewportX != w->screen->x)
++ return FALSE;
++
++ if (w->initialViewportY != w->screen->y)
+ return FALSE;
+
+ if (!w->inputHint &&
+@@ -3880,20 +3888,44 @@
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. */
More information about the fedora-cvs-commits
mailing list