]> git.pld-linux.org Git - packages/compiz.git/commitdiff
- switch windows on all/current desktop option
authorwolf <wolf@pld-linux.org>
Wed, 22 Feb 2006 20:58:13 +0000 (20:58 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    compiz-switcher-all-desktops.patch -> 1.1
    compiz.spec -> 1.8

compiz-switcher-all-desktops.patch [new file with mode: 0644]
compiz.spec

diff --git a/compiz-switcher-all-desktops.patch b/compiz-switcher-all-desktops.patch
new file mode 100644 (file)
index 0000000..94c06fd
--- /dev/null
@@ -0,0 +1,74 @@
+diff -ruN compiz-20060222./plugins/switcher.c compiz-20060222/plugins/switcher.c
+--- compiz-20060222./plugins/switcher.c        2006-02-22 03:27:31.000000000 +0100
++++ compiz-20060222/plugins/switcher.c 2006-02-22 21:47:13.744958456 +0100
+@@ -59,6 +59,8 @@
+ #define SWITCH_TIMESTEP_MAX       50.0f
+ #define SWITCH_TIMESTEP_PRECISION 0.1f
++#define SWITCH_ALL_DESKTOPS_DEFAULT   TRUE
++
+ static char *winType[] = {
+     "Toolbar",
+     "Utility",
+@@ -84,7 +86,8 @@
+ #define SWITCH_SCREEN_OPTION_SPEED      4
+ #define SWITCH_SCREEN_OPTION_TIMESTEP   5
+ #define SWITCH_SCREEN_OPTION_WINDOW_TYPE  6
+-#define SWITCH_SCREEN_OPTION_NUM          7
++#define SWITCH_SCREEN_OPTION_ALL_DESKTOPS 7
++#define SWITCH_SCREEN_OPTION_NUM          8
+ typedef struct _SwitchScreen {
+     PreparePaintScreenProc preparePaintScreen;
+@@ -233,6 +236,11 @@
+           ss->wMask = compWindowTypeMaskFromStringList (&o->value);
+           return TRUE;
+       }
++      break;
++    case SWITCH_SCREEN_OPTION_ALL_DESKTOPS:
++      if (compSetBoolOption (o, value))
++          return TRUE;
++      break;
+     default:
+       break;
+     }
+@@ -325,6 +333,13 @@
+     o->rest.s.nString    = nWindowTypeString;
+     ss->wMask = compWindowTypeMaskFromStringList (&o->value);
++
++    o = &ss->opt[SWITCH_SCREEN_OPTION_ALL_DESKTOPS];
++    o->name      = "all_dekstops";
++    o->shortDesc = "All Desktops";
++    o->longDesc  = "Switch between windows on all virtual desktops";
++    o->type      = CompOptionTypeBool;
++    o->value.b   = SWITCH_ALL_DESKTOPS_DEFAULT;
+ }
+ static void
+@@ -341,6 +356,7 @@
+ static Bool
+ isSwitchWin (CompWindow *w)
+ {
++    int workspaceX, winRealX, winWorkspace;
+     SWITCH_SCREEN (w->screen);
+     if (!w->mapNum || w->attrib.map_state != IsViewable)
+@@ -355,6 +371,17 @@
+     if (w->state & CompWindowStateSkipPagerMask)
+       return FALSE;
++    if (!ss->opt[SWITCH_SCREEN_OPTION_ALL_DESKTOPS].value.b)
++    {
++          /* only switch between windows in the current workspace
++             Tiago Sousa <mirage@kaotik.org> */
++          workspaceX = w->screen->width * w->screen->x;
++          winRealX = w->serverX + workspaceX;
++          winWorkspace = floor((double)winRealX / (double)w->screen->width);
++          if (winWorkspace != w->screen->x)
++              return FALSE;
++    }
++
+     return TRUE;
+ }
index efb88fd42da71b0418fe555c4a7a19e73eb6a86c..4a12ccb2a974bb42455026d69b2d09c5205d1f8a 100644 (file)
@@ -13,6 +13,7 @@ Group:                X11
 Source0:       %{name}-%{_snap}.tar.bz2
 # Source0-md5: 054cfcedab9282f66e5ab89edbd49c35
 Patch0:                %{name}-wobbly.patch
+Patch1:                %{name}-switcher-all-desktops.patch
 BuildRequires: QtCore-devel
 BuildRequires: QtGui-devel
 BuildRequires: avahi-glib-devel
@@ -51,6 +52,7 @@ Pliki nag
 %prep
 %setup -q -n %{name}-%{_snap}
 %patch0 -p0
+%patch1 -p1
 
 %build
 autoreconf -v --install
This page took 0.059893 seconds and 4 git commands to generate.