Re: [compiz] keybindings patch, gnome-keybinding-bridge and vignettes plugins

2007-01-28 Thread Stjepan Glavina
On Sat, 2007-01-27 at 22:54 +0100, gandalfn wrote:
 To illustrate the plugin use, I hacked GNOME applet window list, to have
 an thumbnail plugin equivalent. 
 http://gandalfn.club.fr/ubuntu/vignettes/vignettes-applets-0.0.1.tar.gz
 
 Vignettes plugin manages also minimized windows, instead save the
 thumbnail in the core, I map simply the original window outer the 
 visible space during clone windows is showed. 
 
 You can see here a small video to see vignettes-applet in action:
 http://gandalfn.club.fr/ubuntu/vignettes/vignettes-applets-demo.ogg
 
It doesn't compile with latest Compiz from GIT.
And if I even get it to compile, it just crashes. :(

Stjepan

___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


Re: [compiz] Irritating reloading

2007-01-28 Thread Stjepan Glavina
On Sun, 2007-01-28 at 15:45 +, Mike Dransfield wrote:
 Stjepan Glavina wrote:
  Compiz reloads itself if it crashes or another app kills it.
  This can be sometimes very irritating and annoying. Can there at least
  be a command-line option to disable this?
 

 
 Are you sure? I dont think it does
 
 Maybe you have the crashhandler plugin enabled or something else
 is autorestarting it.
 

No, I just use compiz from GIT without any 3rd party plugins.

Stjepan

___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


[compiz] A patch for minimize plugin.

2007-01-28 Thread Stjepan Glavina
I've added a new option in minimize plugin, called Disable Fading.
To prevent tearing, damageScreen is used minDonePaintScreen (only if the
option is used).

The patch is attached.
--- minimize_orig.c	2007-01-27 08:30:23.0 +0100
+++ minimize.c	2007-01-28 17:21:23.0 +0100
@@ -45,6 +45,8 @@
 #define MIN_SHADE_RESISTANCE_MIN   0
 #define MIN_SHADE_RESISTANCE_MAX   100
 
+#define MIN_DISABLE_FADING_DEFAULT   FALSE
+
 static char *winType[] = {
 N_(Toolbar),
 N_(Utility),
@@ -66,7 +68,8 @@
 #define MIN_SCREEN_OPTION_TIMESTEP	   1
 #define MIN_SCREEN_OPTION_WINDOW_TYPE	   2
 #define MIN_SCREEN_OPTION_SHADE_RESISTANCE 3
-#define MIN_SCREEN_OPTION_NUM		   4
+#define MIN_SCREEN_OPTION_DISABLE_FADING 4
+#define MIN_SCREEN_OPTION_NUM		   5
 
 typedef struct _MinScreen {
 int	windowPrivateIndex;
@@ -185,6 +188,10 @@
 
 	return TRUE;
 	}
+	break;
+	case MIN_SCREEN_OPTION_DISABLE_FADING:
+	if (compSetBoolOption (o, value))
+	return TRUE;
 default:
 	break;
 }
@@ -242,6 +249,13 @@
 o-value.i		= MIN_SHADE_RESISTANCE_DEFAULT;
 o-rest.i.min	= MIN_SHADE_RESISTANCE_MIN;
 o-rest.i.max	= MIN_SHADE_RESISTANCE_MAX;
+
+o = ms-opt[MIN_SCREEN_OPTION_DISABLE_FADING];
+o-name	  = disable_fading;
+o-shortDesc  = N_(Disable Fading);
+o-longDesc	  = N_(Disable fading when minimizing);
+o-type	  = CompOptionTypeBool;
+o-value.b= MIN_DISABLE_FADING_DEFAULT;
 }
 
 static void
@@ -585,6 +599,9 @@
 UNWRAP (ms, s, donePaintScreen);
 (*s-donePaintScreen) (s);
 WRAP (ms, s, donePaintScreen, minDonePaintScreen);
+
+if (ms-opt[MIN_SCREEN_OPTION_DISABLE_FADING].value.b)
+damageScreen(s);
 }
 
 static Bool
@@ -644,9 +661,11 @@
 	glPushMatrix ();
 	glLoadMatrixf (wTransform.m);
 
+	if (ms-opt[MIN_SCREEN_OPTION_DISABLE_FADING].value.b)
+		fragment.opacity = OPAQUE;
+
 	(*s-drawWindow) (w, wTransform, fragment, region,
 			  mask | PAINT_WINDOW_TRANSFORMED_MASK);
-
 	glPopMatrix ();
 }
 else
___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


Re: [compiz] Switcher autorotate

2007-01-27 Thread Stjepan Glavina
On Fri, 2007-01-26 at 18:28 -0500, David Reveman wrote:
 On Thu, 2007-01-25 at 10:32 +0100, Stjepan Glavina wrote:
  It would be great if switcher would rotate cube to the selected window
  when switching. Beryl has autorotate option for this. I find it very
  useful.
 
 Yes, I guess that can be useful.
 
 - David
 

I've just made a patch.
Tell me what you think about it.

Stjepan
--- switcher_orig.c	2007-01-27 08:30:23.0 +0100
+++ switcher.c	2007-01-27 09:01:38.0 +0100
@@ -83,6 +83,8 @@
 
 #define SWITCH_MINIMIZED_DEFAULT TRUE
 
+#define SWITCH_AUTOROTATE_DEFAULT TRUE
+
 static char *winType[] = {
 N_(Toolbar),
 N_(Utility),
@@ -123,7 +125,8 @@
 #define SWITCH_SCREEN_OPTION_ZOOM	  8
 #define SWITCH_SCREEN_OPTION_ICON	  9
 #define SWITCH_SCREEN_OPTION_MINIMIZED	  10
-#define SWITCH_SCREEN_OPTION_NUM	  11
+#define SWITCH_SCREEN_OPTION_AUTOROTATE  11
+#define SWITCH_SCREEN_OPTION_NUM	  12
 
 typedef struct _SwitchScreen {
 PreparePaintScreenProc preparePaintScreen;
@@ -284,6 +287,7 @@
 case SWITCH_SCREEN_OPTION_MIPMAP:
 case SWITCH_SCREEN_OPTION_ICON:
 case SWITCH_SCREEN_OPTION_MINIMIZED:
+case SWITCH_SCREEN_OPTION_AUTOROTATE:
 	if (compSetBoolOption (o, value))
 	return TRUE;
 	break;
@@ -445,6 +449,13 @@
 o-longDesc	  = N_(Show minimized windows);
 o-type	  = CompOptionTypeBool;
 o-value.b= SWITCH_MINIMIZED_DEFAULT;
+
+o = ss-opt[SWITCH_SCREEN_OPTION_AUTOROTATE];
+o-name	  = auto_rotate;
+o-shortDesc  = N_(Auto Rotate);
+o-longDesc	  = N_(Rotate to the selected window while switching);
+o-type	  = CompOptionTypeBool;
+o-value.b= SWITCH_AUTOROTATE_DEFAULT;
 }
 
 static void
@@ -631,6 +642,31 @@
 
 if (w)
 {
+if (ss-opt[SWITCH_SCREEN_OPTION_AUTOROTATE].value.b)
+{
+	XEvent xev;
+	int i, j;
+
+	defaultViewportForWindow(w, i, j);
+
+	xev.xclient.type = ClientMessage;
+	xev.xclient.display = s-display-display;
+	xev.xclient.format = 32;
+
+	xev.xclient.message_type = s-display-desktopViewportAtom;
+	xev.xclient.window = s-root;
+
+	xev.xclient.data.l[0] = i * s-width;
+	xev.xclient.data.l[1] = j * s-height;
+	xev.xclient.data.l[2] = 0;
+	xev.xclient.data.l[3] = 0;
+	xev.xclient.data.l[4] = 0;
+
+	XSendEvent(s-display-display,
+	   s-root, FALSE,
+	   SubstructureRedirectMask | SubstructureNotifyMask, xev);
+	}
+	
 	Window old = ss-selectedWindow;
 
 	ss-lastActiveNum  = w-activeNum;
___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


Re: [compiz] Annoying Scale and DnD behaviour

2007-01-27 Thread Stjepan Glavina
 You would be unable to locate the window to drop
 into, unless you could find it within 2 seconds or kept
 moving the mouse while you are searching.
 
 Regards
 Mike
 
Yes, but currently it's even worse. Try Beryl's scale and you'll see
what I mean.

Stjepan

___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


[compiz] Switcher autorotate

2007-01-25 Thread Stjepan Glavina
It would be great if switcher would rotate cube to the selected window
when switching. Beryl has autorotate option for this. I find it very
useful.

Stjepan

___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


[compiz] Switcher moving the selector instead of the thumbnail list

2007-01-25 Thread Stjepan Glavina
Wouldn't it be better if switcher would move the selector?
This way there wouldn't be 3 thumbnails for 2 windows, 3 for 4 windows,
5 for more than 6 windows (what looks ugly).


___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


Re: [compiz] Thumbnail plugin

2007-01-24 Thread Stjepan Glavina

 Sounds good, lets add it.
 
 Follow the instructions here to get an fdo account:
 
 http://freedesktop.org/wiki/AccountRequests
 
 you can go ahead and add the plugin once you have an account.
 
 - David

Thank you.

Beryl has support for getting thumbnails of windows when they're
unmapped. When a window is unmapped, the pixmap is saved. Look at the
code: http://glug.grm.hia.no/beryl/trunk/beryl-core/src/window.c
(search for 'thumbTexture' and 'thumbPixmap').
Do you have any plans to add support for this in Compiz core too?

Stjepan

___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


Re: [compiz] Patch: switcher's window is a splash window

2007-01-15 Thread Stjepan Glavina
On Thu, 2007-01-11 at 03:06 +0100, David Reveman wrote:
 I'll set the switcher window to utility type for now.
 
 -David
 

Hmm I have just checked out latest sources and it isn't utility yet.

___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


[compiz] Put a window on top

2007-01-05 Thread Stjepan Glavina
I'm developing a new plugin, based on switcher.
I have a window created with XCreateWindow.
Can I put a window totally on top, even over panels?
These are my atoms:

state[nState++] = s-display-winStateAboveAtom;
state[nState++] = s-display-winStateStickyAtom;
state[nState++] = s-display-winStateSkipTaskbarAtom;
state[nState++] = s-display-winStateSkipPagerAtom;

(this code is copied from switcher.c)

Stjepan

___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


[compiz] Vide: bug with minimize+wobbly

2006-12-29 Thread Stjepan Glavina
Hi,

I notice a bug if I start wobbling unminized window before the
minimizing effect is finished.
Here's the video (flash): http://www.youtube.com/watch?v=DttpjXFqbis
Does anybody else notice this?

Stjepan

___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


Re: [compiz] Sane value for Number of Desktops?

2006-12-28 Thread Stjepan Glavina
On Fri, 2006-12-29 at 05:03 +0100, Marco Cabizza wrote:
   I don't know if this has been answered before, but is it planned to
 support desktop switching on the y axis, rather than just left-right ?
 It may become a more complex shape, but i'm really addicted to 2x4
 desktops !

Yes it has been answered before and that would not be possible.
I'll just quote David:

 Top and bottom faces doesn't have the same size as the other faces and
 the rotation of windows on top and bottom faces would be different
 relative to other faces. Due to this it can't be implemented properly as
 long as the cube plugin uses viewports. It could be done if the cube was
 implemented using multiple workspaces instead but then you wouldn't have
 a real relationship between cube sides, of course.
 
 You probably want to use the plane plugin or increase the number of
 sides for the cube plugin.


Stjepan

___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz