Re: [compiz] Unable to start gwd under Fedora 7

2007-06-04 Thread Danny Baumann
Hi,

> gtk-window-decorator: Could not acquire decoration manager selection on 
> screen 0 display ":0.0"

Which version of Compiz do you use? I just tried running
"gtk-window-decorator --replace &" on my box (F7 / latest Git Compiz)
and it worked just fine. Or do you by any chance already have some
decorator running and didn't specify the "--replace" option?

> I have Go 7600 here. Can it be xorg 7.3 problem? Cheers.

I also use a 7600 Go, so this definitely is not the problem. Fedora 7
uses Xorg 7.2 (Xserver 1.3) BTW ;-)

Regards,

Danny

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


[compiz] Unable to start gwd under Fedora 7

2007-06-04 Thread Julian Sikorski
I am getting the following error:
gtk-window-decorator: Could not acquire decoration manager selection on screen 
0 display ":0.0"
I have Go 7600 here. Can it be xorg 7.3 problem? Cheers.
___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


Re: [compiz] status of input redirection

2007-06-04 Thread David Reveman
On Sat, 2007-06-02 at 04:29 +0300, Daniel Stone wrote:
> On Fri, Jun 01, 2007 at 03:47:17PM -0400, David Reveman wrote:
> > +   switch (events[i].u.u.type) {
> > +   case MotionNotify:
> > +   case ButtonPress:
> > +   case ButtonRelease:
> > +   case KeyPress:
> > +   case KeyRelease:
> > +   case EnterNotify:
> > +   case LeaveNotify:
> 
> Hi,
> This needs to be aware of Xi events.

Yea, I forgot about that. Will the attached patch work or are those
device events not using the keyButtonPointer structure?

-David
--- a/dix/events.c
+++ b/dix/events.c
@@ -4688,6 +4688,7 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events)
 {
 	WindowPtr pWin;
 	int	  x, y, dx, dy;
+	Bool	  keyButtonEvent = FALSE;
 
 	switch (events[i].u.u.type) {
 	case MotionNotify:
@@ -4697,30 +4698,42 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events)
 	case KeyRelease:
 	case EnterNotify:
 	case LeaveNotify:
-	pWin = LookupIDByType (events[i].u.keyButtonPointer.event,
-   RT_WINDOW);
-	if (pWin)
-	{
-		x = events[i].u.keyButtonPointer.rootX;
-		y = events[i].u.keyButtonPointer.rootY;
-
-		/*
-		 * rootX and rootY are in screen coordinate space.
-		 * Transform to windows root coordinate space before writing
-		 * events to client.
-		 */
-		CompositeXYScreenToWindowRootCoordinate (pWin, x, y, &x, &y);
-
-		dx = x - events[i].u.keyButtonPointer.rootX;
-		dy = y - events[i].u.keyButtonPointer.rootY;
-
-		events[i].u.keyButtonPointer.rootX  += dx;
-		events[i].u.keyButtonPointer.rootY  += dy;
-		events[i].u.keyButtonPointer.eventX += dx;
-		events[i].u.keyButtonPointer.eventY += dy;
-	}
+	keyButtonEvent = TRUE;
+	break;
+	default:
+	if (events[i].u.u.type == DeviceMotionNotify  ||
+		events[i].u.u.type == DeviceButtonPress	  ||
+		events[i].u.u.type == DeviceButtonRelease ||
+		events[i].u.u.type == DeviceKeyPress	  ||
+		events[i].u.u.type == DeviceKeyRelease)
+		keyButtonEvent = TRUE;
 	break;
 	}
+
+	if (!keyButtonEvent)
+	continue;
+
+	pWin = LookupIDByType (events[i].u.keyButtonPointer.event, RT_WINDOW);
+	if (pWin)
+	{
+	x = events[i].u.keyButtonPointer.rootX;
+	y = events[i].u.keyButtonPointer.rootY;
+
+	/*
+	 * rootX and rootY are in screen coordinate space.
+	 * Transform to windows root coordinate space before writing
+	 * events to client.
+	 */
+	CompositeXYScreenToWindowRootCoordinate (pWin, x, y, &x, &y);
+
+	dx = x - events[i].u.keyButtonPointer.rootX;
+	dy = y - events[i].u.keyButtonPointer.rootY;
+
+	events[i].u.keyButtonPointer.rootX  += dx;
+	events[i].u.keyButtonPointer.rootY  += dy;
+	events[i].u.keyButtonPointer.eventX += dx;
+	events[i].u.keyButtonPointer.eventY += dy;
+	}
 }
 #endif
 
___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


Re: [compiz] status of input redirection

2007-06-04 Thread David Reveman
On Sun, 2007-06-03 at 05:26 +0200, Dennis Kasprzyk wrote:
> Am Freitag, 1. Juni 2007 21:47:17 schrieb David Reveman:
> > On Fri, 2007-06-01 at 13:28 -0400, Kristian Høgsberg wrote:
> > > On 5/31/07, David Reveman <[EMAIL PROTECTED]> wrote:
> > > > On Tue, 2007-05-29 at 08:53 +0200, dragoran wrote:
> > > > > There where some patches to implement input redirection in xorg a
> > > > > while ago...
> > > > > what happend to them? are they still beeing worked on?
> > > >
> > > > The attached patches work well. The server patch needs some more work
> > > > if we want to allow different pickers and I haven't had time to do that
> > > > yet.
> > >
> > > Can we merge the server patch as is and punt on the pluggable picker
> > > idea for now?  I mean, can we do this in a way that lets the
> > > interested parties add this support in a second step without breaking
> > > backwards compatibility?  If that's doable, I don't think we need to
> > > block on the pluggable picker idea now.
> >
> > I've attached a new patch with a more appropriate change to
> > WriteEventsToClient.
> >
> > I'm OK with merging the patch in it's current state. Pluggable pickers
> > can definitely be added later without breaking backwards compatibility.
> >
> > There's a few things that needs to be improved but I think the current
> > patch is good enough for common use in compositing managers.
> >
> > TODO:
> >
> > I've tried to move the event coordinate transformation into
> > FixUpEventFromWindow, which means making copies of events in a lot of
> > places as FixUpEventFromWindow is sometimes called multiple times with
> > the same xEvent. However, I never got that to work correctly and I
> > haven't had time to figure out exactly why yet.
> >
> > The pointer grab code might need some more work but the patch should of
> > course not affect non-transformed input in any way.
> >
> > I think that transformed input of non top-level windows isn't working
> > correctly. This should be easy to fix though, I just need to write a
> > good test app.
> >
> > -David
> 
> After playing with this patches I thought that maybe this interface could 
> also 
> be extended to some basic real input "redirection". Instead of a mapping from 
> the "transformed" coordinate space to the "real" window coordinate space, 
> there could be an additional value, that tells the xserver to redirect and 
> transform the input from the "transformed" coordinate space to another window 
> coordinate space. With something like this we could realize something like 
> cloned windows in different stack positions (using "input only" windows and 
> the composite manager).
> 
> I think about somethink like this:
> XCompositeSetTriangularCoordinateMesh(Display *dpy, Window source, Window 
> destination, XTriangle *triangle, int ntriangle);
> 
> I don't know enough about the xserver internals to tell if something like 
> this 
> is possible, but I think that this could extend the range for possible 
> effects. 

It might be a good idea to add a destination window. It shouldn't be
very hard to implement. The destination window can't be an ancestor,
though.

-David

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


Re: [compiz] PaintOutput patches for widget, cheatsheet and flash

2007-06-04 Thread Mike Dransfield
Sam Spilsbury wrote:
> Erm, forgot to attach them :/

Thanks, I have applied the necessary changes for those
to work.  Widget didn't need any changes though, did you
just search and replace?

Regards
Mike

>
>
>
> On 6/4/07, Sam Spilsbury <[EMAIL PROTECTED]> wrote:
>> Hi
>>
>> Attached are some patches to make widget, cheatsheet and flash work
>> with the current Compiz GIT.
>>
>> They are my first patches so please do not shoot me down for them. It
>> is just me trying to understand the code a little more.
>>
>> They Compile OK here (i686, SUSE 10.2) and should compiz OK if you
>> have a recent (==days) version of compiz.
>>
>> All I have done really is replace PaintScreen with PaintOutput and
>> paintScreen with paintOutput.
>>
>> I hope they are of some use.
>>
>> PS : On a side note. Considering that most users dont really know too
>> much about these plugins, is it possible that we can mirror them on
>> git.opencompositing.org? We will give full credit to the authors and
>> whoever mantains them. I also need something to write about in OCCN!
>> :P
>>
>> -SmSpillaz
>>
> 
>
> diff --git a/cheatsheet.c b/cheatsheet.c
> index 98cb899..9a9d8a6 100644
> --- a/cheatsheet.c
> +++ b/cheatsheet.c
> @@ -45,7 +45,7 @@ typedef struct _CheatsheetDisplay {
>  } CheatsheetDisplay;
>  
>  typedef struct _CheatsheetScreen {
> -PaintScreenProc paintScreen;
> +PaintOutputProc paintOutput;
>  intgrabIndex;
>  
>  Pixmap pixmap;
> @@ -639,7 +639,7 @@ cheatsheetTerminate (CompDisplay *d,
>  }
>  
>  static Bool
> -cheatsheetPaintScreen (CompScreen   *s,
> +cheatsheetPaintOutput (CompScreen   *s,
>const ScreenPaintAttrib *sAttrib,
>const CompTransform *transform,
>Regionregion,
> @@ -650,9 +650,9 @@ cheatsheetPaintScreen (CompScreen*s,
>  
>  CHEATSHEET_SCREEN (s);
>  
> -UNWRAP (cs, s, paintScreen);
> -status = (*s->paintScreen) (s, sAttrib, transform, region, output, mask);
> -WRAP (cs, s, paintScreen, cheatsheetPaintScreen);
> +UNWRAP (cs, s, paintOutput);
> +status = (*s->paintOutput) (s, sAttrib, transform, region, output, mask);
> +WRAP (cs, s, paintOutput, cheatsheetPaintOutput);
>  
>  if (status && cs->content && region->numRects)
>  {
> @@ -828,7 +828,7 @@ cheatsheetInitScreen (CompPlugin *p,
>  
>  addScreenAction (s, 
> &cd->opt[CHEATSHEET_DISPLAY_OPTION_INITIATE].value.action);
>
> -WRAP (cs, s, paintScreen, cheatsheetPaintScreen);
> +WRAP (cs, s, paintOutput, cheatsheetPaintOutput);
>  
>  s->privates[cd->screenPrivateIndex].ptr = cs;
>  
> @@ -852,7 +852,7 @@ cheatsheetFiniScreen (CompPlugin *p,
>  if (cs->pixmap)
> XFreePixmap (s->display->display, cs->pixmap);
>  
> -UNWRAP (cs, s, paintScreen);
> +UNWRAP (cs, s, paintOutput);
>  
>  free (cs);
>  }
> diff --git a/cheatsheet.xml b/cheatsheet.xml
> lines 17-54/54 (END) 
>
>
>   
> 
>
> diff --git a/widget.c b/widget.c
> index 8a34909..7b275fa 100644
> --- a/widget.c
> +++ b/widget.c
> @@ -103,8 +103,8 @@ typedef struct _WidgetScreen
>  WidgetPaintTypepaintType;
>  
>  PaintWindowProcpaintWindow;
> -PreparePaintScreenProc preparePaintScreen;
> -DonePaintScreenProcdonePaintScreen;
> +PreparePaintOutputProc preparePaintOutput;
> +DonePaintOutputProcdonePaintOutput;
>  WindowResizeNotifyProc windowResizeNotify;
>  WindowMoveNotifyProc   windowMoveNotify;
>  Cursor cursor;
> @@ -410,7 +410,7 @@ widgetUnGrabScreen (CompScreen *s)
>  }
>  
>  static void
> -widgetPreparePaintScreen (CompScreen  *s,
> +widgetPreparePaintOutput (CompScreen  *s,
>int msSinceLastPaint)
>  {
>  WIDGET_SCREEN (s);
> @@ -459,13 +459,13 @@ widgetPreparePaintScreen (CompScreen  *s
>  
>  }
>  
> -UNWRAP (ws, s, preparePaintScreen);
> -(*s->preparePaintScreen) (s, msSinceLastPaint);
> -WRAP (ws, s, preparePaintScreen, widgetPreparePaintScreen);
> +UNWRAP (ws, s, preparePaintOutput);
> +(*s->preparePaintOutput) (s, msSinceLastPaint);
> +WRAP (ws, s, preparePaintOutput, widgetPreparePaintOutput);
>  }
>  
>  static void
>
> -widgetDonePaintScreen(CompScreen * s)
> +widgetDonePaintOutput(CompScreen * s)
>  {
>  WIDGET_SCREEN(s);
>  
> @@ -474,9 +474,9 @@ widgetDonePaintScreen(CompScreen * s
> damageScreen (s);
>  }
>  
> -UNWRAP (ws, s, donePaintScreen);
> -(*s->donePaintScreen) (s);
> -WRAP (ws, s, donePaintScreen, widgetDonePaintScreen);
> +UNWRAP (ws, s, donePaintOutput);
> +(*s->donePaintOutput) (s);
> +WRAP (ws, s, donePaintOutput, widgetDonePaintOutput);
>  }
>  
>  static Bool
> @@ -925,8 +925,8 @@ widge

Re: [compiz] PaintOutput patches for widget, cheatsheet and flash

2007-06-04 Thread Sam Spilsbury

Erm, forgot to attach them :/



On 6/4/07, Sam Spilsbury <[EMAIL PROTECTED]> wrote:

Hi

Attached are some patches to make widget, cheatsheet and flash work
with the current Compiz GIT.

They are my first patches so please do not shoot me down for them. It
is just me trying to understand the code a little more.

They Compile OK here (i686, SUSE 10.2) and should compiz OK if you
have a recent (==days) version of compiz.

All I have done really is replace PaintScreen with PaintOutput and
paintScreen with paintOutput.

I hope they are of some use.

PS : On a side note. Considering that most users dont really know too
much about these plugins, is it possible that we can mirror them on
git.opencompositing.org? We will give full credit to the authors and
whoever mantains them. I also need something to write about in OCCN!
:P

-SmSpillaz

diff --git a/cheatsheet.c b/cheatsheet.c
index 98cb899..9a9d8a6 100644
--- a/cheatsheet.c
+++ b/cheatsheet.c
@@ -45,7 +45,7 @@ typedef struct _CheatsheetDisplay {
 } CheatsheetDisplay;
 
 typedef struct _CheatsheetScreen {
-PaintScreenProc paintScreen;
+PaintOutputProc paintOutput;
 intgrabIndex;
 
 Pixmap pixmap;
@@ -639,7 +639,7 @@ cheatsheetTerminate (CompDisplay *d,
 }
 
 static Bool
-cheatsheetPaintScreen (CompScreen   *s,
+cheatsheetPaintOutput (CompScreen   *s,
   const ScreenPaintAttrib *sAttrib,
   const CompTransform *transform,
   Regionregion,
@@ -650,9 +650,9 @@ cheatsheetPaintScreen (CompScreen*s,
 
 CHEATSHEET_SCREEN (s);
 
-UNWRAP (cs, s, paintScreen);
-status = (*s->paintScreen) (s, sAttrib, transform, region, output, mask);
-WRAP (cs, s, paintScreen, cheatsheetPaintScreen);
+UNWRAP (cs, s, paintOutput);
+status = (*s->paintOutput) (s, sAttrib, transform, region, output, mask);
+WRAP (cs, s, paintOutput, cheatsheetPaintOutput);
 
 if (status && cs->content && region->numRects)
 {
@@ -828,7 +828,7 @@ cheatsheetInitScreen (CompPlugin *p,
 
 addScreenAction (s, &cd->opt[CHEATSHEET_DISPLAY_OPTION_INITIATE].value.action);

-WRAP (cs, s, paintScreen, cheatsheetPaintScreen);
+WRAP (cs, s, paintOutput, cheatsheetPaintOutput);
 
 s->privates[cd->screenPrivateIndex].ptr = cs;
 
@@ -852,7 +852,7 @@ cheatsheetFiniScreen (CompPlugin *p,
 if (cs->pixmap)
XFreePixmap (s->display->display, cs->pixmap);
 
-UNWRAP (cs, s, paintScreen);
+UNWRAP (cs, s, paintOutput);
 
 free (cs);
 }
diff --git a/cheatsheet.xml b/cheatsheet.xml
lines 17-54/54 (END) 


diff --git a/widget.c b/widget.c
index 8a34909..7b275fa 100644
--- a/widget.c
+++ b/widget.c
@@ -103,8 +103,8 @@ typedef struct _WidgetScreen
 WidgetPaintTypepaintType;
 
 PaintWindowProcpaintWindow;
-PreparePaintScreenProc preparePaintScreen;
-DonePaintScreenProcdonePaintScreen;
+PreparePaintOutputProc preparePaintOutput;
+DonePaintOutputProcdonePaintOutput;
 WindowResizeNotifyProc windowResizeNotify;
 WindowMoveNotifyProc   windowMoveNotify;
 Cursor cursor;
@@ -410,7 +410,7 @@ widgetUnGrabScreen (CompScreen *s)
 }
 
 static void
-widgetPreparePaintScreen (CompScreen  *s,
+widgetPreparePaintOutput (CompScreen  *s,
   int msSinceLastPaint)
 {
 WIDGET_SCREEN (s);
@@ -459,13 +459,13 @@ widgetPreparePaintScreen (CompScreen  *s
 
 }
 
-UNWRAP (ws, s, preparePaintScreen);
-(*s->preparePaintScreen) (s, msSinceLastPaint);
-WRAP (ws, s, preparePaintScreen, widgetPreparePaintScreen);
+UNWRAP (ws, s, preparePaintOutput);
+(*s->preparePaintOutput) (s, msSinceLastPaint);
+WRAP (ws, s, preparePaintOutput, widgetPreparePaintOutput);
 }
 
 static void

-widgetDonePaintScreen(CompScreen * s)
+widgetDonePaintOutput(CompScreen * s)
 {
 WIDGET_SCREEN(s);
 
@@ -474,9 +474,9 @@ widgetDonePaintScreen(CompScreen * s
damageScreen (s);
 }
 
-UNWRAP (ws, s, donePaintScreen);
-(*s->donePaintScreen) (s);
-WRAP (ws, s, donePaintScreen, widgetDonePaintScreen);
+UNWRAP (ws, s, donePaintOutput);
+(*s->donePaintOutput) (s);
+WRAP (ws, s, donePaintOutput, widgetDonePaintOutput);
 }
 
 static Bool
@@ -925,8 +925,8 @@ widgetInitScreen (CompPlugin *p,
 ws->grabIndex = 0;
 
 WRAP (ws, s, paintWindow, widgetPaintWindow);
-WRAP (ws, s, preparePaintScreen, widgetPreparePaintScreen);
-WRAP (ws, s, donePaintScreen, widgetDonePaintScreen);
+WRAP (ws, s, preparePaintOutput, widgetPreparePaintOutput);
+WRAP (ws, s, donePaintOutput, widgetDonePaintOutput);
 
 return TRUE;
 }
@@ -938,8 +938,8 @@ widgetFiniScreen (CompPlugin *p,
 WIDGET_SCREEN (s);
 
 UNWRAP (ws, s, paintWindow);
-UNWRAP (ws, s, preparePaintScreen);
-UNWRAP (ws, s, donePaintScreen);
+UNWRAP (ws, s, preparePaintOutput);
+UNWRAP (ws, s, 

[compiz] PaintOutput patches for widget, cheatsheet and flash

2007-06-04 Thread Sam Spilsbury
Hi

Attached are some patches to make widget, cheatsheet and flash work
with the current Compiz GIT.

They are my first patches so please do not shoot me down for them. It
is just me trying to understand the code a little more.

They Compile OK here (i686, SUSE 10.2) and should compiz OK if you
have a recent (==days) version of compiz.

All I have done really is replace PaintScreen with PaintOutput and
paintScreen with paintOutput.

I hope they are of some use.

PS : On a side note. Considering that most users dont really know too
much about these plugins, is it possible that we can mirror them on
git.opencompositing.org? We will give full credit to the authors and
whoever mantains them. I also need something to write about in OCCN!
:P

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