Hello community,
here is the log from the commit of package compiz
checked in at Fri May 26 14:42:40 CEST 2006.
--------
--- compiz/compiz.changes 2006-05-21 15:40:12.000000000 +0200
+++ compiz/compiz.changes 2006-05-26 12:47:45.000000000 +0200
@@ -1,0 +2,19 @@
+Fri May 26 12:34:27 CEST 2006 - dreveman@suse.de
+
+- Task switcher (ALT-TAB) able to "show all" (bnc 173376)
+- Fix so swicher doesn't eat keystrokes (bnc 177650)
+- MSB byte order fix (bnc 178171)
+- Fix keyboard navigation in scale plugin (bnc 178216)
+- Don't add windows that appear after the switcher is popped up
+ (bnc 178350)
+- Add maximize_window_horizontally,
+ maximize_window_vertically, toggle_window_maximized,
+ toggle_window_maximized_horizontally,
+ toggle_window_maximized_vertically bindings (bnc 178220)
+- Fix window gravity issue (bnc 178765)
+- Fix cube rendering issue (bnc 178233)
+- Treat dock windows with below state as normal windows
+ (bnc 178316)
+- Make sloppy focus default in scale mode (bnc 174788)
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ compiz.spec ++++++
--- /var/tmp/diff_new_pack.vZdlpg/_old 2006-05-26 14:40:57.000000000 +0200
+++ /var/tmp/diff_new_pack.vZdlpg/_new 2006-05-26 14:40:57.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package compiz (Version cvs_060521)
+# spec file for package compiz (Version cvs_060526)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -17,7 +17,7 @@
PreReq: %fillup_prereq
Requires: libpng libdrm gconf2 gtk2 gnome-desktop control-center2 libsvg libsvg-cairo libwnck xgl-hardware-list >= 060519
Autoreqprov: on
-Version: cvs_060521
+Version: cvs_060526
Release: 1
Summary: OpenGL window and compositing manager.
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -138,6 +138,22 @@
/etc/opt/gnome/gconf/schemas/compiz.schemas
%changelog -n compiz
+* Fri May 26 2006 - dreveman@suse.de
+- Task switcher (ALT-TAB) able to "show all" (bnc 173376)
+- Fix so swicher doesn't eat keystrokes (bnc 177650)
+- MSB byte order fix (bnc 178171)
+- Fix keyboard navigation in scale plugin (bnc 178216)
+- Don't add windows that appear after the switcher is popped up
+ (bnc 178350)
+- Add maximize_window_horizontally,
+ maximize_window_vertically, toggle_window_maximized,
+ toggle_window_maximized_horizontally,
+ toggle_window_maximized_vertically bindings (bnc 178220)
+- Fix window gravity issue (bnc 178765)
+- Fix cube rendering issue (bnc 178233)
+- Treat dock windows with below state as normal windows
+ (bnc 178316)
+- Make sloppy focus default in scale mode (bnc 174788)
* Sun May 21 2006 - dreveman@suse.de
- Fix stacking and sync request issues. (bnc #173416)
- Fix shadow performance in g-w-d.
++++++ compiz-0.0.11.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.11/ChangeLog new/compiz-0.0.11/ChangeLog
--- old/compiz-0.0.11/ChangeLog 2006-05-21 15:18:52.000000000 +0200
+++ new/compiz-0.0.11/ChangeLog 2006-05-26 12:05:57.000000000 +0200
@@ -1,5 +1,96 @@
+2006-05-26 David Reveman
+
+ * plugins/compiz.schemas.in.in: Regen.
+
+ * plugins/scale.c (SCALE_SLOPPY_FOCUS_DEFAULT): TRUE.
+
+ * plugins/decoration.c (decorWindowUpdate): No drop-shadow decoration
+ on windows with below state.
+
+ * src/window.c (recalcWindowType): Treat dock windows with below state
+ as normal windows. (bnc #178316)
+
+ * plugins/cube.c (cubePaintTransformedScreen): Avoid optimized case
+ when more than 4 cube sides.
+
+2006-05-25 David Reveman
+
+ * plugins/compiz.schemas.in.in: Regen.
+
+ * src/window.c (moveResizeWindow): Don't adjust position for NorthWest
+ gravity. (bnc 178765) (fdo #6992)
+
+ * plugins/compiz.schemas.in.in:
+ * include/compiz.h:
+ * src/event.c (handleEvent):
+ * src/display.c: Add maximize_window_horizontally,
+ maximize_window_vertically, toggle_window_maximized,
+ toggle_window_maximized_horizontally,
+ toggle_window_maximized_vertically.
+
+ * src/event.c (handleEvent): Track changes to maximizeWindow function.
+
+ * plugins/move.c (moveHandleMotionEvent): Make sure we have a saved
+ width before we use it. Track changes to maximizeWindow function.
+
+ * plugins/wobbly.c (wobblyHandleEvent): Handle the case where
+ window is not both vertically and horizontally maximized better.
+
+ * include/compiz.h: Add MAXIMIZE_STATE macro.
+
+ * include/compiz.h:
+ * src/window.c: Remove unmaximizeWindow and make maximizeWindow
+ take a state mask so it can be used for both maximizing and
+ unmaximizing.
+
+ * plugins/switcher.c: Don't add windows that appear after the switcher
+ is popped up. (bnc 178350)
+ (switchWindowRemove): Don't create a new list. Instead remove
+ window from the existing list and make sure we're positioned
+ correctly.
+
+2006-05-24 David Reveman
+
+ * plugins/scale.c (scaleMoveFocusWindow): When moving to window on
+ left, make sure the window we're moving to is completely left of
+ currently selected window. And same thing when moving to window on
+ right, top, bottom.
+ (layoutThumbs): Set slot->x2 and slot->y2 correctly. (bnc 178216)
+
+2006-05-23 David Reveman
+
+ * plugins/water.c: GL_UNSIGNED_INT_8_8_8_8_REV as pixel data type on
+ MSBFirst machines.
+
+ * src/texture.c: Include config.h before compiz.h so that
+ IMAGE_BYTE_ORDER is defined correctly. (bnc 178171)
+
+ * include/compiz.h: Define LSBFirst, MSBFirst, IMAGE_BYTE_ORDER,
+ BITMAP_BIT_ORDER. (bnc 178171)
+
+2006-05-23 Dan Winship
+
+ * plugins/switcher.c (switchToWindow): use ss->windows here as
+ well so that multiple activeNum==0 windows don't get skipped.
+ (switchTerminate): Remove the screen grab right away so that
+ keystrokes don't get dropped. bnc 177650
+ (switchPreparePaintScreen, switchPaintScreen,
+ switchDonePaintScreen): update for that
+
+2006-05-22 Dan Winship
+
+ * src/window.c (moveResizeWindow): deal with both vertical and
+ horizontal struts; but not when moving a dock window
+
+ * plugins/switcher.c (switchHandleEvent): Check init_all binding
+ before init, so you can bind "<Alt>" to init_all and so end up
+ with "<Alt>Tab" being init_all rather than init (but with no way
+ to get "init"...). bnc 173376
+
2006-05-21 David Reveman
+ * src/display.c (addDisplay): Select for button events on root windows.
+
* configure.ac: Bump version to 0.0.11.
* gnome/window-decorator/gnome-window-decorator.c: Fix shadow
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.11/include/compiz.h new/compiz-0.0.11/include/compiz.h
--- old/compiz-0.0.11/include/compiz.h 2006-05-20 12:51:42.000000000 +0200
+++ new/compiz-0.0.11/include/compiz.h 2006-05-25 05:43:37.000000000 +0200
@@ -42,6 +42,21 @@
#include
#include
+/*
+ * WORDS_BIGENDIAN should be defined before including this file for
+ * IMAGE_BYTE_ORDER and BITMAP_BIT_ORDER to be set correctly.
+ */
+#define LSBFirst 0
+#define MSBFirst 1
+
+#ifdef WORDS_BIGENDIAN
+# define IMAGE_BYTE_ORDER MSBFirst
+# define BITMAP_BIT_ORDER MSBFirst
+#else
+# define IMAGE_BYTE_ORDER LSBFirst
+# define BITMAP_BIT_ORDER LSBFirst
+#endif
+
typedef struct _CompPlugin CompPlugin;
typedef struct _CompDisplay CompDisplay;
typedef struct _CompScreen CompScreen;
@@ -101,6 +116,9 @@
#define CompWindowStateDemandsAttentationMask (1 << 11)
#define CompWindowStateDisplayModalMask (1 << 12)
+#define MAXIMIZE_STATE (CompWindowStateMaximizedHorzMask | \
+ CompWindowStateMaximizedVertMask)
+
#define CompWindowActionMoveMask (1 << 0)
#define CompWindowActionResizeMask (1 << 1)
#define CompWindowActionStickMask (1 << 2)
@@ -387,17 +405,22 @@
#define COMP_DISPLAY_OPTION_UNMAXIMIZE_WINDOW 34
#define COMP_DISPLAY_OPTION_MINIMIZE_WINDOW 35
#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW 36
-#define COMP_DISPLAY_OPTION_OPACITY_INCREASE 37
-#define COMP_DISPLAY_OPTION_OPACITY_DECREASE 38
-#define COMP_DISPLAY_OPTION_SCREENSHOT 39
-#define COMP_DISPLAY_OPTION_RUN_SCREENSHOT 40
-#define COMP_DISPLAY_OPTION_WINDOW_SCREENSHOT 41
-#define COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT 42
-#define COMP_DISPLAY_OPTION_WINDOW_MENU 43
-#define COMP_DISPLAY_OPTION_SHOW_DESKTOP 44
-#define COMP_DISPLAY_OPTION_RAISE_ON_CLICK 45
-#define COMP_DISPLAY_OPTION_AUDIBLE_BELL 46
-#define COMP_DISPLAY_OPTION_NUM 47
+#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_HORZ 37
+#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_VERT 38
+#define COMP_DISPLAY_OPTION_OPACITY_INCREASE 39
+#define COMP_DISPLAY_OPTION_OPACITY_DECREASE 40
+#define COMP_DISPLAY_OPTION_SCREENSHOT 41
+#define COMP_DISPLAY_OPTION_RUN_SCREENSHOT 42
+#define COMP_DISPLAY_OPTION_WINDOW_SCREENSHOT 43
+#define COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT 44
+#define COMP_DISPLAY_OPTION_WINDOW_MENU 45
+#define COMP_DISPLAY_OPTION_SHOW_DESKTOP 46
+#define COMP_DISPLAY_OPTION_RAISE_ON_CLICK 47
+#define COMP_DISPLAY_OPTION_AUDIBLE_BELL 48
+#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED 49
+#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_HORZ 50
+#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_VERT 51
+#define COMP_DISPLAY_OPTION_NUM 52
typedef CompOption *(*GetDisplayOptionsProc) (CompDisplay *display,
int *count);
@@ -1831,10 +1854,8 @@
unminimizeWindow (CompWindow *w);
void
-maximizeWindow (CompWindow *w);
-
-void
-unmaximizeWindow (CompWindow *w);
+maximizeWindow (CompWindow *w,
+ int state);
Bool
getWindowUserTime (CompWindow *w,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.11/plugins/compiz.schemas.in.in new/compiz-0.0.11/plugins/compiz.schemas.in.in
--- old/compiz-0.0.11/plugins/compiz.schemas.in.in 2006-05-19 10:28:18.000000000 +0200
+++ new/compiz-0.0.11/plugins/compiz.schemas.in.in 2006-05-26 12:04:55.000000000 +0200
@@ -527,6 +527,34 @@
</schema>
<schema>
+ <key>/schemas/apps/compiz/general/allscreens/options/maximize_window_horizontally</key>
+ <applyto>/apps/compiz/general/allscreens/options/maximize_window_horizontally</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Maximize Window Horizontally</short>
+ <long>
+ Maximize active window horizontally
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/general/allscreens/options/maximize_window_vertically</key>
+ <applyto>/apps/compiz/general/allscreens/options/maximize_window_vertically</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Maximize Window Vertically</short>
+ <long>
+ Maximize active window vertically
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
<key>/schemas/apps/compiz/general/allscreens/options/opacity_increase</key>
<applyto>/apps/compiz/general/allscreens/options/opacity_increase</applyto>
<owner>compiz</owner>
@@ -667,6 +695,48 @@
</schema>
<schema>
+ <key>/schemas/apps/compiz/general/allscreens/options/toggle_window_maximized</key>
+ <applyto>/apps/compiz/general/allscreens/options/toggle_window_maximized</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Toggle Window Maximized</short>
+ <long>
+ Toggle active window maximized
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/general/allscreens/options/toggle_window_maximized_horizontally</key>
+ <applyto>/apps/compiz/general/allscreens/options/toggle_window_maximized_horizontally</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Toggle Window Maximized Horizontally</short>
+ <long>
+ Toggle active window maximized horizontally
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/general/allscreens/options/toggle_window_maximized_vertically</key>
+ <applyto>/apps/compiz/general/allscreens/options/toggle_window_maximized_vertically</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Toggle Window Maximized Vertically</short>
+ <long>
+ Toggle active window maximized vertically
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
<key>/schemas/apps/compiz/general/screen0/options/detect_refresh_rate</key>
<applyto>/apps/compiz/general/screen0/options/detect_refresh_rate</applyto>
<owner>compiz</owner>
@@ -1985,7 +2055,7 @@
<applyto>/apps/compiz/plugins/scale/screen0/options/sloppy_focus</applyto>
<owner>compiz</owner>
<type>bool</type>
- <default>false</default>
+ <default>true</default>
<locale name="C">
<short>Sloppy Focus</short>
<long>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.11/plugins/cube.c new/compiz-0.0.11/plugins/cube.c
--- old/compiz-0.0.11/plugins/cube.c 2006-05-09 17:54:10.000000000 +0200
+++ new/compiz-0.0.11/plugins/cube.c 2006-05-25 16:22:05.000000000 +0200
@@ -1225,7 +1225,7 @@
/* outside cube */
if (cs->invert == 1)
{
- if (cs->grabIndex)
+ if (cs->grabIndex || s->size > 4)
{
GLenum filter;
int i;
@@ -1234,7 +1234,7 @@
sa.yRotate += (360.0f / size) * ((s->size >> 1) - 1);
filter = s->display->textureFilter;
- if (cs->opt[CUBE_SCREEN_OPTION_MIPMAP].value.b)
+ if (cs->grabIndex && cs->opt[CUBE_SCREEN_OPTION_MIPMAP].value.b)
s->display->textureFilter = GL_LINEAR_MIPMAP_LINEAR;
for (i = 0; i < s->size; i++)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.11/plugins/decoration.c new/compiz-0.0.11/plugins/decoration.c
--- old/compiz-0.0.11/plugins/decoration.c 2006-05-02 22:33:41.000000000 +0200
+++ new/compiz-0.0.11/plugins/decoration.c 2006-05-26 03:48:40.000000000 +0200
@@ -820,6 +820,10 @@
case CompWindowTypeDockMask:
if (w->region->numRects == 1 && !w->alpha)
decor = ds->decor[DECOR_BARE];
+
+ /* no decoration on windows with below state */
+ if (w->state & CompWindowStateBelowMask)
+ decor = NULL;
break;
default:
break;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.11/plugins/move.c new/compiz-0.0.11/plugins/move.c
--- old/compiz-0.0.11/plugins/move.c 2006-05-03 16:41:34.000000000 +0200
+++ new/compiz-0.0.11/plugins/move.c 2006-05-25 06:17:45.000000000 +0200
@@ -296,8 +296,7 @@
}
else
{
- unsigned int state = w->state;
- int min, max;
+ int min, max;
dx = md->x;
dy = md->y;
@@ -319,22 +318,26 @@
{
if (yRoot - ms->snapOffY >= SNAP_OFF)
{
+ int width = w->attrib.width;
+
w->saveMask |= CWX | CWY;
- w->saveWc.x = xRoot - (w->saveWc.width >> 1);
+ if (w->saveMask & CWWidth)
+ width = w->saveWc.width;
+
+ w->saveWc.x = xRoot - (width >> 1);
w->saveWc.y = yRoot + (w->input.top >> 1);
md->x = md->y = 0;
- unmaximizeWindow (w);
+ maximizeWindow (w, 0);
ms->snapOffY = ms->snapBackY;
return;
}
}
- else if ((ms->origState & CompWindowStateMaximizedVertMask) &&
- (ms->origState & CompWindowStateMaximizedHorzMask))
+ else if (ms->origState & CompWindowStateMaximizedVertMask)
{
if (yRoot - ms->snapBackY < SNAP_BACK)
{
@@ -342,7 +345,7 @@
{
int wy;
- maximizeWindow (w);
+ maximizeWindow (w, ms->origState);
wy = s->workArea.y + (w->input.top >> 1);
wy += w->sizeHints.height_inc >> 1;
@@ -355,7 +358,7 @@
}
}
- if (state & CompWindowStateMaximizedVertMask)
+ if (w->state & CompWindowStateMaximizedVertMask)
{
min = s->workArea.y + w->input.top;
max = s->workArea.y + s->workArea.height -
@@ -367,7 +370,7 @@
dy = max - w->attrib.y;
}
- if (state & CompWindowStateMaximizedHorzMask)
+ if (w->state & CompWindowStateMaximizedHorzMask)
{
if (w->attrib.x > s->width || w->attrib.x + w->width < 0)
return;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.11/plugins/scale.c new/compiz-0.0.11/plugins/scale.c
--- old/compiz-0.0.11/plugins/scale.c 2006-05-19 16:02:57.000000000 +0200
+++ new/compiz-0.0.11/plugins/scale.c 2006-05-26 12:02:13.000000000 +0200
@@ -42,7 +42,7 @@
#define SCALE_SPACING_MIN 0
#define SCALE_SPACING_MAX 250
-#define SCALE_SLOPPY_FOCUS_DEFAULT FALSE
+#define SCALE_SLOPPY_FOCUS_DEFAULT TRUE
#define SCALE_INITIATE_KEY_DEFAULT "Pause"
#define SCALE_INITIATE_MODIFIERS_DEFAULT 0
@@ -831,10 +831,16 @@
{
ss->slots[i].y1 += ss->windows[i]->input.top;
ss->slots[i].x1 += ss->windows[i]->input.left;
+ ss->slots[i].y2 += ss->windows[i]->input.top;
+ ss->slots[i].x2 += ss->windows[i]->input.left;
ss->slots[i].y1 = (float) ss->slots[i].y1 * ss->scale;
ss->slots[i].x1 = (float) ss->slots[i].x1 * ss->scale;
+ ss->slots[i].y2 = (float) ss->slots[i].y2 * ss->scale;
+ ss->slots[i].x2 = (float) ss->slots[i].x2 * ss->scale;
ss->slots[i].x1 += s->workArea.x;
ss->slots[i].y1 += s->workArea.y;
+ ss->slots[i].x2 += s->workArea.x;
+ ss->slots[i].y2 += s->workArea.y;
}
}
@@ -1164,10 +1170,10 @@
d = abs (x - cx) + abs (y - cy);
if (d < min)
{
- if ((dx > 0 && x < sw->slot->x2) ||
- (dx < 0 && x > sw->slot->x1) ||
- (dy > 0 && y < sw->slot->y2) ||
- (dy < 0 && y > sw->slot->y1))
+ if ((dx > 0 && slot->x1 < sw->slot->x2) ||
+ (dx < 0 && slot->x2 > sw->slot->x1) ||
+ (dy > 0 && slot->y1 < sw->slot->y2) ||
+ (dy < 0 && slot->y2 > sw->slot->y1))
continue;
min = d;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.11/plugins/switcher.c new/compiz-0.0.11/plugins/switcher.c
--- old/compiz-0.0.11/plugins/switcher.c 2006-05-19 13:00:55.000000000 +0200
+++ new/compiz-0.0.11/plugins/switcher.c 2006-05-26 02:11:36.000000000 +0200
@@ -116,7 +116,6 @@
DonePaintScreenProc donePaintScreen;
PaintScreenProc paintScreen;
PaintWindowProc paintWindow;
- DamageWindowRectProc damageWindowRect;
CompOption opt[SWITCH_SCREEN_OPTION_NUM];
CompOption init_all_bind, prev_bind, prev_all_bind;
@@ -606,26 +605,8 @@
switchUpdateWindowList (CompScreen *s,
int count)
{
- CompWindow *w;
-
SWITCH_SCREEN (s);
- ss->nWindows = 0;
-
- for (w = s->windows; w; w = w->next)
- {
- if (isSwitchWin (w))
- switchAddWindowToList (s, w);
- }
-
- qsort (ss->windows, ss->nWindows, sizeof (CompWindow *), compareWindows);
-
- if (ss->nWindows == 2)
- {
- switchAddWindowToList (s, ss->windows[0]);
- switchAddWindowToList (s, ss->windows[1]);
- }
-
if (count > 1)
{
count -= (count + 1) & 1;
@@ -647,79 +628,58 @@
}
static void
-switchToWindow (CompScreen *s,
- Bool toNext)
+switchCreateWindowList (CompScreen *s,
+ int count)
{
- CompWindow *next = NULL;
- CompWindow *prev = NULL;
CompWindow *w;
SWITCH_SCREEN (s);
- if (!ss->grabIndex)
- return;
+ ss->nWindows = 0;
for (w = s->windows; w; w = w->next)
{
- if (w->id == ss->selectedWindow)
- continue;
-
if (isSwitchWin (w))
- {
- if (w->activeNum < ss->lastActiveNum)
- {
- if (next)
- {
- if (toNext)
- {
- if (w->activeNum > next->activeNum)
- next = w;
- }
- else
- {
- if (w->activeNum < next->activeNum)
- next = w;
- }
- }
- else
- next = w;
- }
- else if (w->activeNum > ss->lastActiveNum)
- {
- if (prev)
- {
- if (toNext)
- {
- if (w->activeNum > prev->activeNum)
- prev = w;
- }
- else
- {
- if (w->activeNum < prev->activeNum)
- prev = w;
- }
- }
- else
- prev = w;
- }
- }
+ switchAddWindowToList (s, w);
}
- if (toNext)
+ qsort (ss->windows, ss->nWindows, sizeof (CompWindow *), compareWindows);
+
+ if (ss->nWindows == 2)
{
- if (next)
- w = next;
- else
- w = prev;
+ switchAddWindowToList (s, ss->windows[0]);
+ switchAddWindowToList (s, ss->windows[1]);
}
- else
+
+ switchUpdateWindowList (s, count);
+}
+
+static void
+switchToWindow (CompScreen *s,
+ Bool toNext)
+{
+ CompWindow *w;
+ int cur;
+
+ SWITCH_SCREEN (s);
+
+ if (!ss->grabIndex)
+ return;
+
+ for (cur = 0; cur < ss->nWindows; cur++)
{
- if (prev)
- w = prev;
- else
- w = next;
+ if (ss->windows[cur]->id == ss->selectedWindow)
+ break;
}
+ if (cur == ss->nWindows)
+ return;
+
+ if (toNext)
+ w = ss->windows[(cur + 1) % ss->nWindows];
+ else
+ w = ss->windows[(cur + ss->nWindows - 1) % ss->nWindows];
+
if (w)
{
Window old = ss->selectedWindow;
@@ -912,7 +872,7 @@
{
ss->lastActiveNum = s->activeNum;
- switchUpdateWindowList (s, count);
+ switchCreateWindowList (s, count);
ss->sTranslate = ss->zoom;
@@ -975,13 +935,13 @@
sendWindowActivationRequest (w->screen, w->id);
}
+ removeScreenGrab (s, ss->grabIndex, 0);
+ ss->grabIndex = 0;
+
if (!ss->zooming)
{
ss->selectedWindow = None;
ss->zoomedWindow = None;
-
- removeScreenGrab (s, ss->grabIndex, 0);
- ss->grabIndex = 0;
}
else
{
@@ -1003,21 +963,103 @@
w = findWindowAtDisplay (d, id);
if (w)
{
- int i;
+ Bool inList = FALSE;
+ int count, j, i = 0;
+ Window selected, old;
SWITCH_SCREEN (w->screen);
- for (i = 0; i < ss->nWindows; i++)
+ if (isSwitchWin (w))
+ return;
+
+ old = selected = ss->selectedWindow;
+
+ while (i < ss->nWindows)
{
if (ss->windows[i] == w)
{
- ss->lastActiveNum = w->screen->activeNum;
+ inList = TRUE;
- switchUpdateWindowList (w->screen,
- switchCountWindows (w->screen));
+ if (w->id == selected)
+ {
+ if (i < ss->nWindows)
+ selected = ss->windows[i + 1]->id;
+ else
+ selected = ss->windows[0]->id;
+ }
- break;
+ ss->nWindows--;
+ for (j = i; j < ss->nWindows; j++)
+ ss->windows[j] = ss->windows[j + 1];
}
+ else
+ {
+ i++;
+ }
+ }
+
+ if (!inList)
+ return;
+
+ count = ss->nWindows;
+
+ if (ss->nWindows == 2)
+ {
+ if (ss->windows[0] == ss->windows[1])
+ {
+ ss->nWindows--;
+ count = 1;
+ }
+ else
+ {
+ switchAddWindowToList (w->screen, ss->windows[0]);
+ switchAddWindowToList (w->screen, ss->windows[1]);
+ }
+ }
+
+ if (ss->nWindows == 0)
+ {
+ switchTerminate (w->screen, FALSE);
+ return;
+ }
+
+ if (!ss->grabIndex)
+ return;
+
+ switchUpdateWindowList (w->screen, count);
+
+ for (i = 0; i < ss->nWindows; i++)
+ {
+ ss->selectedWindow = ss->windows[i]->id;
+
+ if (ss->selectedWindow == selected)
+ break;
+
+ ss->pos -= WIDTH;
+ if (ss->pos < -ss->nWindows * WIDTH)
+ ss->pos += ss->nWindows * WIDTH;
+ }
+
+ if (ss->popupWindow)
+ {
+ CompWindow *popup;
+
+ popup = findWindowAtScreen (w->screen, ss->popupWindow);
+ if (popup)
+ addWindowDamage (popup);
+
+ setSelectedWindowHint (w->screen);
+ }
+
+ if (old != ss->selectedWindow)
+ {
+ addWindowDamage (w);
+
+ w = findWindowAtScreen (w->screen, old);
+ if (w)
+ addWindowDamage (w);
+
+ ss->moreAdjust = 1;
}
}
}
@@ -1040,13 +1082,13 @@
if (!ss->switching)
{
- if (eventMatches (d, event,
- &ss->opt[SWITCH_SCREEN_OPTION_INITIATE]) ||
- eventMatches (d, event, &ss->prev_bind))
- switchInitiate (s, FALSE);
- else if (eventMatches (d, event, &ss->init_all_bind) ||
- eventMatches (d, event, &ss->prev_all_bind))
+ if (eventMatches (d, event, &ss->init_all_bind) ||
+ eventMatches (d, event, &ss->prev_all_bind))
switchInitiate (s, TRUE);
+ else if (eventMatches (d, event,
+ &ss->opt[SWITCH_SCREEN_OPTION_INITIATE]) ||
+ eventMatches (d, event, &ss->prev_bind))
+ switchInitiate (s, FALSE);
}
if (eventMatches (d, event,
@@ -1191,11 +1233,11 @@
ss->translate = 0.0f;
ss->sTranslate = ss->zoom;
+ ss->selectedWindow = None;
+ ss->zoomedWindow = None;
+
if (ss->grabIndex)
{
- ss->selectedWindow = None;
- ss->zoomedWindow = None;
-
removeScreenGrab (s, ss->grabIndex, 0);
ss->grabIndex = 0;
}
@@ -1244,7 +1286,7 @@
SWITCH_SCREEN (s);
- if (ss->grabIndex)
+ if (ss->grabIndex || ss->zooming)
{
ScreenPaintAttrib sa = *sAttrib;
CompWindow *zoomed;
@@ -1330,7 +1372,7 @@
{
SWITCH_SCREEN (s);
- if (ss->grabIndex && ss->moreAdjust)
+ if ((ss->grabIndex || ss->zooming) && ss->moreAdjust)
{
if (ss->zooming)
{
@@ -1671,52 +1713,6 @@
}
static Bool
-switchDamageWindowRect (CompWindow *w,
- Bool initial,
- BoxPtr rect)
-{
- Bool status;
-
- SWITCH_SCREEN (w->screen);
-
- if (ss->grabIndex && ss->switching)
- {
- if (initial)
- {
- if (isSwitchWin (w))
- {
- ss->lastActiveNum = w->screen->activeNum;
-
- switchUpdateWindowList (w->screen,
- switchCountWindows (w->screen));
- }
- else if (w->id == ss->popupWindow)
- {
- updateWindowAttributes (w, TRUE);
- }
- }
- else if (!ss->moreAdjust)
- {
- if (isSwitchWin (w))
- {
- CompWindow *popup;
-
- popup = findWindowAtScreen (w->screen, ss->popupWindow);
- if (popup)
- addWindowDamage (popup);
-
- }
- }
- }
-
- UNWRAP (ss, w->screen, damageWindowRect);
- status = (*w->screen->damageWindowRect) (w, initial, rect);
- WRAP (ss, w->screen, damageWindowRect, switchDamageWindowRect);
-
- return status;
-}
-
-static Bool
switchInitDisplay (CompPlugin *p,
CompDisplay *d)
{
@@ -1817,7 +1813,6 @@
WRAP (ss, s, donePaintScreen, switchDonePaintScreen);
WRAP (ss, s, paintScreen, switchPaintScreen);
WRAP (ss, s, paintWindow, switchPaintWindow);
- WRAP (ss, s, damageWindowRect, switchDamageWindowRect);
s->privates[sd->screenPrivateIndex].ptr = ss;
@@ -1834,7 +1829,6 @@
UNWRAP (ss, s, donePaintScreen);
UNWRAP (ss, s, paintScreen);
UNWRAP (ss, s, paintWindow);
- UNWRAP (ss, s, damageWindowRect);
if (ss->windowsSize)
free (ss->windows);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.11/plugins/water.c new/compiz-0.0.11/plugins/water.c
--- old/compiz-0.0.11/plugins/water.c 2006-05-05 10:30:03.000000000 +0200
+++ new/compiz-0.0.11/plugins/water.c 2006-05-23 16:36:16.000000000 +0200
@@ -23,6 +23,10 @@
* Author: David Reveman
*/
+#ifdef HAVE_CONFIG_H
+# include "../config.h"
+#endif
+
#include
#include
#include
@@ -495,7 +499,13 @@
ws->height,
0,
GL_BGRA,
+
+#if IMAGE_BYTE_ORDER == MSBFirst
+ GL_UNSIGNED_INT_8_8_8_8_REV,
+#else
GL_UNSIGNED_BYTE,
+#endif
+
ws->t0);
}
@@ -807,7 +817,13 @@
ws->height,
0,
GL_BGRA,
- GL_UNSIGNED_BYTE,
+
+#if IMAGE_BYTE_ORDER == MSBFirst
+ GL_UNSIGNED_INT_8_8_8_8_REV,
+#else
+ GL_UNSIGNED_BYTE,
+#endif
+
ws->t0);
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.11/plugins/wobbly.c new/compiz-0.0.11/plugins/wobbly.c
--- old/compiz-0.0.11/plugins/wobbly.c 2006-05-19 10:28:19.000000000 +0200
+++ new/compiz-0.0.11/plugins/wobbly.c 2006-05-25 06:14:39.000000000 +0200
@@ -38,9 +38,6 @@
#define WIN_W(w) ((w)->width + (w)->output.left + (w)->output.right)
#define WIN_H(w) ((w)->height + (w)->output.top + (w)->output.bottom)
-#define MAXIMIZE_STATE (CompWindowStateMaximizedVertMask | \
- CompWindowStateMaximizedHorzMask)
-
#define GRID_WIDTH 4
#define GRID_HEIGHT 4
@@ -2330,8 +2327,7 @@
{
WOBBLY_WINDOW (ws->grabWindow);
- if (ww->state & (CompWindowStateMaximizedVertMask |
- CompWindowStateMaximizedHorzMask))
+ if (ww->state & MAXIMIZE_STATE)
{
WOBBLY_WINDOW (ws->grabWindow);
@@ -2339,8 +2335,15 @@
{
int dx, dy;
- dx = pointerX - lastPointerX;
- dy = pointerY - lastPointerY;
+ if (ww->state & CompWindowStateMaximizedHorzMask)
+ dx = pointerX - lastPointerX;
+ else
+ dx = 0;
+
+ if (ww->state & CompWindowStateMaximizedVertMask)
+ dy = pointerY - lastPointerY;
+ else
+ dy = 0;
ww->model->anchorObject->position.x += dx;
ww->model->anchorObject->position.y += dy;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.11/src/display.c new/compiz-0.0.11/src/display.c
--- old/compiz-0.0.11/src/display.c 2006-05-17 11:25:15.000000000 +0200
+++ new/compiz-0.0.11/src/display.c 2006-05-24 23:01:45.000000000 +0200
@@ -308,6 +308,24 @@
XKeysymToKeycode (display->display,
XStringToKeysym (MAXIMIZE_WINDOW_KEY_DEFAULT));
+ o = &display->opt[COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_HORZ];
+ o->name = "maximize_window_horizontally";
+ o->shortDesc = "Maximize Window Horizontally";
+ o->longDesc = "Maximize active window horizontally";
+ o->type = CompOptionTypeBinding;
+ o->value.bind.type = CompBindingTypeNone;
+ o->value.bind.u.key.modifiers = 0;
+ o->value.bind.u.key.keycode = 0;
+
+ o = &display->opt[COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_VERT];
+ o->name = "maximize_window_vertically";
+ o->shortDesc = "Maximize Window Vertically";
+ o->longDesc = "Maximize active window vertically";
+ o->type = CompOptionTypeBinding;
+ o->value.bind.type = CompBindingTypeNone;
+ o->value.bind.u.key.modifiers = 0;
+ o->value.bind.u.key.keycode = 0;
+
o = &display->opt[COMP_DISPLAY_OPTION_SHOW_DESKTOP];
o->name = "show_desktop";
o->shortDesc = "Hide all windows and focus desktop";
@@ -451,6 +469,35 @@
o->longDesc = "Audible system beep";
o->type = CompOptionTypeBool;
o->value.b = AUDIBLE_BELL_DEFAULT;
+
+ o = &display->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED];
+ o->name = "toggle_window_maximized";
+ o->shortDesc = "Toggle Window Maximized";
+ o->longDesc = "Toggle active window maximized";
+ o->type = CompOptionTypeBinding;
+ o->value.bind.type = CompBindingTypeNone;
+ o->value.bind.u.key.modifiers = 0;
+ o->value.bind.u.key.keycode = 0;
+
+ o = &display->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_HORZ];
+ o->name = "toggle_window_maximized_horizontally";
+ o->shortDesc = "Toggle Window Maximized Horizontally";
+ o->longDesc =
+ "Toggle active window maximized horizontally";
+ o->type = CompOptionTypeBinding;
+ o->value.bind.type = CompBindingTypeNone;
+ o->value.bind.u.key.modifiers = 0;
+ o->value.bind.u.key.keycode = 0;
+
+ o = &display->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_VERT];
+ o->name = "toggle_window_maximized_vertically";
+ o->shortDesc = "Toggle Window Maximized Vertically";
+ o->longDesc =
+ "Toggle active window maximized vertically";
+ o->type = CompOptionTypeBinding;
+ o->value.bind.type = CompBindingTypeNone;
+ o->value.bind.u.key.modifiers = 0;
+ o->value.bind.u.key.keycode = 0;
}
CompOption *
@@ -561,6 +608,8 @@
case COMP_DISPLAY_OPTION_RUN_DIALOG:
case COMP_DISPLAY_OPTION_MINIMIZE_WINDOW:
case COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW:
+ case COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_HORZ:
+ case COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_VERT:
case COMP_DISPLAY_OPTION_UNMAXIMIZE_WINDOW:
case COMP_DISPLAY_OPTION_SHOW_DESKTOP:
case COMP_DISPLAY_OPTION_RUN_COMMAND0:
@@ -582,6 +631,9 @@
case COMP_DISPLAY_OPTION_RUN_SCREENSHOT:
case COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT:
case COMP_DISPLAY_OPTION_WINDOW_MENU:
+ case COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED:
+ case COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_HORZ:
+ case COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_VERT:
if (addDisplayBinding (display, &value->bind))
{
removeDisplayBinding (display, &o->value.bind);
@@ -1583,6 +1635,10 @@
addScreenBinding (s,
&d->opt[COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW].value.bind);
addScreenBinding (s,
+ &d->opt[COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_HORZ].value.bind);
+ addScreenBinding (s,
+ &d->opt[COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_VERT].value.bind);
+ addScreenBinding (s,
&d->opt[COMP_DISPLAY_OPTION_UNMAXIMIZE_WINDOW].value.bind);
addScreenBinding (s, &d->opt[COMP_DISPLAY_OPTION_SHOW_DESKTOP].value.bind);
addScreenBinding (s, &d->opt[COMP_DISPLAY_OPTION_RUN_COMMAND0].value.bind);
@@ -1607,6 +1663,13 @@
addScreenBinding (s, &d->opt[COMP_DISPLAY_OPTION_RUN_SCREENSHOT].value.bind);
addScreenBinding (s, &d->opt[COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT].value.bind);
addScreenBinding (s, &d->opt[COMP_DISPLAY_OPTION_WINDOW_MENU].value.bind);
+ addScreenBinding (s,
+ &d->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED].value.bind);
+ addScreenBinding (s,
+ &d->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_HORZ].value.bind);
+ addScreenBinding (s,
+ &d->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_VERT].value.bind);
+
}
void
@@ -2020,6 +2083,8 @@
EnterWindowMask |
KeyPressMask |
KeyReleaseMask |
+ ButtonPressMask |
+ ButtonReleaseMask |
FocusChangeMask |
ExposureMask);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.11/src/event.c new/compiz-0.0.11/src/event.c
--- old/compiz-0.0.11/src/event.c 2006-05-21 14:23:56.000000000 +0200
+++ new/compiz-0.0.11/src/event.c 2006-05-25 15:54:12.000000000 +0200
@@ -423,7 +423,29 @@
{
w = findTopLevelWindowAtScreen (s, event->xbutton.window);
if (w)
- maximizeWindow (w);
+ maximizeWindow (w, MAXIMIZE_STATE);
+
+ eventMode = AsyncPointer;
+ }
+
+ if (eventMatches (d, event,
+ &d->opt[COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_HORZ]))
+ {
+ w = findTopLevelWindowAtScreen (s, event->xbutton.window);
+ if (w)
+ maximizeWindow (w, w->state |
+ CompWindowStateMaximizedHorzMask);
+
+ eventMode = AsyncPointer;
+ }
+
+ if (eventMatches (d, event,
+ &d->opt[COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_VERT]))
+ {
+ w = findTopLevelWindowAtScreen (s, event->xbutton.window);
+ if (w)
+ maximizeWindow (w, w->state |
+ CompWindowStateMaximizedVertMask);
eventMode = AsyncPointer;
}
@@ -433,7 +455,7 @@
{
w = findTopLevelWindowAtScreen (s, event->xbutton.window);
if (w)
- unmaximizeWindow (w);
+ maximizeWindow (w, 0);
eventMode = AsyncPointer;
}
@@ -567,6 +589,37 @@
eventMode = AsyncPointer;
}
+ if (eventMatches (d, event,
+ &d->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED]))
+ {
+ w = findTopLevelWindowAtScreen (s, event->xbutton.window);
+ if (w)
+ {
+ if ((w->state & MAXIMIZE_STATE) == MAXIMIZE_STATE)
+ maximizeWindow (w, 0);
+ else
+ maximizeWindow (w, MAXIMIZE_STATE);
+ }
+ }
+
+ if (eventMatches (d, event,
+ &d->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_HORZ]))
+ {
+ w = findTopLevelWindowAtScreen (s, event->xbutton.window);
+ if (w)
+ maximizeWindow (w, w->state ^
+ CompWindowStateMaximizedHorzMask);
+ }
+
+ if (eventMatches (d, event,
+ &d->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_VERT]))
+ {
+ w = findTopLevelWindowAtScreen (s, event->xbutton.window);
+ if (w)
+ maximizeWindow (w, w->state ^
+ CompWindowStateMaximizedVertMask);
+ }
+
if (!d->screens->maxGrab)
XAllowEvents (d->display, eventMode, event->xbutton.time);
}
@@ -594,7 +647,25 @@
{
w = findTopLevelWindowAtScreen (s, d->activeWindow);
if (w)
- maximizeWindow (w);
+ maximizeWindow (w, MAXIMIZE_STATE);
+ }
+
+ if (eventMatches (d, event,
+ &d->opt[COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_HORZ]))
+ {
+ w = findTopLevelWindowAtScreen (s, d->activeWindow);
+ if (w)
+ maximizeWindow (w, w->state |
+ CompWindowStateMaximizedHorzMask);
+ }
+
+ if (eventMatches (d, event,
+ &d->opt[COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_VERT]))
+ {
+ w = findTopLevelWindowAtScreen (s, d->activeWindow);
+ if (w)
+ maximizeWindow (w, w->state |
+ CompWindowStateMaximizedVertMask);
}
if (eventMatches (d, event,
@@ -602,7 +673,7 @@
{
w = findTopLevelWindowAtScreen (s, d->activeWindow);
if (w)
- unmaximizeWindow (w);
+ maximizeWindow (w, 0);
}
if (eventMatches (d, event,
@@ -704,6 +775,37 @@
if (eventMatches (d, event,
&d->opt[COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT]))
runCommand (s, d->opt[COMP_DISPLAY_OPTION_WINDOW_SCREENSHOT].value.s);
+
+ if (eventMatches (d, event,
+ &d->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED]))
+ {
+ w = findTopLevelWindowAtScreen (s, d->activeWindow);
+ if (w)
+ {
+ if ((w->state & MAXIMIZE_STATE) == MAXIMIZE_STATE)
+ maximizeWindow (w, 0);
+ else
+ maximizeWindow (w, MAXIMIZE_STATE);
+ }
+ }
+
+ if (eventMatches (d, event,
+ &d->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_HORZ]))
+ {
+ w = findTopLevelWindowAtScreen (s, d->activeWindow);
+ if (w)
+ maximizeWindow (w, w->state ^
+ CompWindowStateMaximizedHorzMask);
+ }
+
+ if (eventMatches (d, event,
+ &d->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_VERT]))
+ {
+ w = findTopLevelWindowAtScreen (s, d->activeWindow);
+ if (w)
+ maximizeWindow (w, w->state ^
+ CompWindowStateMaximizedVertMask);
+ }
}
break;
case KeyRelease:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.11/src/texture.c new/compiz-0.0.11/src/texture.c
--- old/compiz-0.0.11/src/texture.c 2006-05-09 17:51:37.000000000 +0200
+++ new/compiz-0.0.11/src/texture.c 2006-05-23 16:33:13.000000000 +0200
@@ -23,6 +23,10 @@
* Author: David Reveman
*/
+#ifdef HAVE_CONFIG_H
+# include "../config.h"
+#endif
+
#include
#include
#include
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.11/src/window.c new/compiz-0.0.11/src/window.c
--- old/compiz-0.0.11/src/window.c 2006-05-21 14:43:05.000000000 +0200
+++ new/compiz-0.0.11/src/window.c 2006-05-26 03:46:05.000000000 +0200
@@ -592,6 +592,9 @@
type = CompWindowTypeDialogMask;
}
+ if (type == CompWindowTypeDockMask && (w->state & CompWindowStateBelowMask))
+ type = CompWindowTypeNormalMask;
+
if ((type & (CompWindowTypeNormalMask | CompWindowTypeDialogMask)) &&
(w->state & CompWindowStateModalMask))
type = CompWindowTypeModalDialogMask;
@@ -2135,13 +2138,6 @@
if (xwcm & (CWX | CWWidth))
{
switch (gravity) {
- case NorthWestGravity:
- case WestGravity:
- case SouthWestGravity:
- if (xwcm & CWX)
- xwc->x += w->input.left;
- break;
-
case NorthGravity:
case CenterGravity:
case SouthGravity:
@@ -2169,13 +2165,6 @@
if (xwcm & (CWY | CWHeight))
{
switch (gravity) {
- case NorthWestGravity:
- case NorthGravity:
- case NorthEastGravity:
- if (xwcm & CWY)
- xwc->y += w->input.top;
- break;
-
case WestGravity:
case CenterGravity:
case EastGravity:
@@ -2200,17 +2189,33 @@
xwcm |= CWY;
}
- if (xwcm & CWY)
+ if (!(w->type & (CompWindowTypeDockMask | CompWindowTypeUnknownMask)))
{
- int min, max;
+ if (xwcm & CWY)
+ {
+ int min, max;
+
+ min = w->screen->workArea.y + w->input.top;
+ max = w->screen->workArea.y + w->screen->workArea.height;
+
+ if (xwc->y < min)
+ xwc->y = min;
+ else if (xwc->y > max)
+ xwc->y = max;
+ }
+
+ if (xwcm & CWX)
+ {
+ int min, max;
- min = w->screen->workArea.y + w->input.top;
- max = w->screen->workArea.y + w->screen->workArea.height;
+ min = w->screen->workArea.x + w->input.left;
+ max = w->screen->workArea.x + w->screen->workArea.width;
- if (xwc->y < min)
- xwc->y = min;
- else if (xwc->y > max)
- xwc->y = max;
+ if (xwc->x < min)
+ xwc->x = min;
+ else if (xwc->x > max)
+ xwc->x = max;
+ }
}
if (xwcm & CWBorderWidth)
@@ -3449,24 +3454,24 @@
}
void
-maximizeWindow (CompWindow *w)
+maximizeWindow (CompWindow *w,
+ int state)
{
- int state = 0;
-
if (w->attrib.override_redirect)
return;
- if (w->actions & CompWindowActionMaximizeHorzMask)
- state |= CompWindowStateMaximizedHorzMask;
+ if (!(w->actions & CompWindowActionMaximizeHorzMask))
+ state &= ~CompWindowStateMaximizedHorzMask;
- if (w->actions & CompWindowActionMaximizeVertMask)
- state |= CompWindowStateMaximizedVertMask;
+ if (!(w->actions & CompWindowActionMaximizeVertMask))
+ state &= ~CompWindowStateMaximizedVertMask;
- state &= ~w->state;
+ state &= MAXIMIZE_STATE;
- if (!state)
+ if (state == (w->state & MAXIMIZE_STATE))
return;
+ w->state &= ~MAXIMIZE_STATE;
w->state |= state;
recalcWindowType (w);
@@ -3477,27 +3482,6 @@
setWindowState (w->screen->display, w->state, w->id);
}
-void
-unmaximizeWindow (CompWindow *w)
-{
- if (w->attrib.override_redirect)
- return;
-
- if (!(w->state & (CompWindowStateMaximizedHorzMask |
- CompWindowStateMaximizedVertMask)))
- return;
-
- w->state &= ~(CompWindowStateMaximizedHorzMask |
- CompWindowStateMaximizedVertMask);
-
- recalcWindowType (w);
- recalcWindowActions (w);
-
- updateWindowAttributes (w, FALSE);
-
- setWindowState (w->screen->display, w->state, w->id);
-}
-
Bool
getWindowUserTime (CompWindow *w,
Time *time)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...