[compiz] Maximized windows dissappear

2007-04-27 Thread Jesper Andersen
Hi,

I am using the lastest git version of compiz and just run in to a new
problem after switching to using the ini configuration plugin over the
gconf-one. When I maximize a window and then try to move it to another
viewport, the cube rotates but the maximized window disappears instead
of moving along to the new viewport. The maximized window can be found
using the scale plugin (only on show-all action). Further, if I then try
to unmaximize the window, the window again disappears and I have to use
scale's show-all action. Now, however the window appears in some random
almost out of viewport location and I have to drag it back into
position.

I do not know whether it was my switch to the ini plugin that caused
this annoying change in behavior.

What gives? Could it be that I should load the plugins in a different
order?

Cheers,
Jesper

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


Re: [compiz] [PATCH] Resize improvements (Multiple resize modes, better aspect ratio constraining)

2007-04-27 Thread Danny Baumann
Hi,

> 0002-Do-not-make-constrainNewWindowSize-depend-on-the-act.patch
> This one updates constrainNewWindowSize so that it returns TRUE if the
> new calculated size does not match the old, passed size rather than the
> window's server size.

I just noticed that this patch has some implications on existing usages
of constrainNewWindowSize which cause these to not work properly. Please
find attached a patch which extends the mentioned patch by fixing those
existing usages of this function.
We still need this patch, however, because otherwise we can't know if
any constraining was done by constrainNewWindowSize when called using
outline resize mode as in this mode, w->serverWidth/Height will be
constant all the time. I also believe making the return value depend on
the information if there was actual constraining done makes a cleaner
API.

Regards,

Danny
diff --git a/src/window.c b/src/window.c
index fbae40e..6e18579 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3435,13 +3435,23 @@ addWindowSizeChanges (CompWindow *w,
 	xwc->width  = oldWidth;
 	xwc->height = oldHeight;
 
-	if (constrainNewWindowSize (w, width, height, &width, &height))
+	constrainNewWindowSize (w, width, height, &width, &height);
+
+	if (width != w->serverWidth)
+	{
+		mask |= CWWidth;
+		xwc->width = width;
+	}
+	else
+		mask &= ~CWWidth;
+
+	if (height != w->serverHeight)
 	{
-		xwc->width  = width;
+		mask |= CWHeight;
 		xwc->height = height;
 	}
 	else
-		mask &= ~(CWWidth | CWHeight);
+		mask &= ~CWHeight;
 
 	if (w->state & CompWindowStateMaximizedVertMask)
 	{
@@ -3528,17 +3538,29 @@ moveResizeWindow (CompWindow *w,
 {
 	int width, height;
 
-	if (constrainNewWindowSize (w,
-xwc->width, xwc->height,
-&width, &height))
+	if (!constrainNewWindowSize (w,
+	 			 xwc->width, xwc->height,
+	 			 &width, &height))
 	{
-	xwcm |= (CWWidth | CWHeight);
+	width  = xwc->width;
+	height = xwc->height;
+	}
 
+	if (width != w->serverWidth)
+	{
+	xwcm |= CWWidth;
 	xwc->width = width;
+	}
+ 	else
+	xwcm &= ~CWWidth;
+
+	if (height != w->serverHeight)
+	{
+	xwcm |= CWHeight;
 	xwc->height = height;
 	}
 	else
-	xwcm &= ~(CWWidth | CWHeight);
+	xwcm &= ~CWHeight;
 }
 
 if (xwcm & (CWX | CWWidth))
@@ -4033,6 +4055,8 @@ constrainNewWindowSize (CompWindow *w,
 {
 CompDisplay  *d = w->screen->display;
 const XSizeHints *hints = &w->sizeHints;
+int  oldWidth = width;
+int  oldHeight = height;
 int		 min_width = 0;
 int		 min_height = 0;
 int		 base_width = 0;
@@ -4164,7 +4188,7 @@ constrainNewWindowSize (CompWindow *w,
 #undef FLOOR64
 #undef FLOOR
 
-if (width != w->serverWidth || height != w->serverHeight)
+if (width != oldWidth || height != oldHeight)
 {
 	*newWidth  = width;
 	*newHeight = height;
___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


Re: [compiz] adding XCB dependency

2007-04-27 Thread dragoran

David Reveman wrote:

 it's possible to
disable Xlib at build time for those who are interested in that would be
neat.

does this mean that it would still be possible to run compiz without xcb?


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


Re: [compiz] adding XCB dependency

2007-04-27 Thread Danny Baumann
Hi,

> I intend to make compiz depend on XCB and Xlib/XCB sometime soon so we
> can start using XCB where it's beneficial [1]. I'm mostly interested in
> using it for asynchronous reading of window properties but we should
> eventually try to use it for as much as possible. Removing Xlib
> completely might not make sense as we need to support multiple
> implementations of GLX but getting to a stage where it's possible to
> disable Xlib at build time for those who are interested in that would be
> neat.
> 
> If you've got any issues with XCB and Xlib/XCB being added as
> dependencies please speak up asap. Thanks.

Just for curiousity - which distros do actually ship XCB at the moment,
at least as some sort of extra/unofficial package? I couldn't find one
at the moment for my distro (FC6/F7) and I doubt many people (as in:
users of compiz) want to compile XCB and Xlib/XCB manually.
Does anyone of you know when XCB will be included in all major
distributions? 

Regards,

Danny

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


Re: [compiz] adding XCB dependency

2007-04-27 Thread dragoran



Just for curiousity - which distros do actually ship XCB at the moment,
at least as some sort of extra/unofficial package? I couldn't find one
at the moment for my distro (FC6/F7) and I doubt many people (as in:
users of compiz) want to compile XCB and Xlib/XCB manually.
Does anyone of you know when XCB will be included in all major
distributions? 

  
for fedora its planned for F8 (ajax said this last time when somebody 
asked about it)


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


Re: [compiz] adding XCB dependency

2007-04-27 Thread Matt Russell
On Fri, 2007-04-27 at 18:13 +0200, Danny Baumann wrote:
> Hi,
> 
> > I intend to make compiz depend on XCB and Xlib/XCB sometime soon so we
> > can start using XCB where it's beneficial [1]. I'm mostly interested in
> > using it for asynchronous reading of window properties but we should
> > eventually try to use it for as much as possible. Removing Xlib
> > completely might not make sense as we need to support multiple
> > implementations of GLX but getting to a stage where it's possible to
> > disable Xlib at build time for those who are interested in that would be
> > neat.
> > 
> > If you've got any issues with XCB and Xlib/XCB being added as
> > dependencies please speak up asap. Thanks.
> 
> Just for curiousity - which distros do actually ship XCB at the moment,
> at least as some sort of extra/unofficial package? I couldn't find one
> at the moment for my distro (FC6/F7) and I doubt many people (as in:
> users of compiz) want to compile XCB and Xlib/XCB manually.
> Does anyone of you know when XCB will be included in all major
> distributions? 
> 
> Regards,
> 
> Danny
> 
> ___
> compiz mailing list
> compiz@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/compiz

XCB is included in the official repository in Ubuntu Feisty, but not
installed by default.

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


Re: [compiz] adding XCB dependency

2007-04-27 Thread Travis Watkins

On 4/27/07, Matt Russell <[EMAIL PROTECTED]> wrote:

XCB is included in the official repository in Ubuntu Feisty, but not
installed by default.


Worse, xlib in Ubuntu 7.04 does not use XCB so it's all or nothing,
you can't mix the two. Ubuntu 7.10 will have this though.

--
Travis Watkins
http://www.realistanew.com
___
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz


[compiz] Re: adding XCB dependency

2007-04-27 Thread Colin Guthrie
Danny Baumann wrote:
> Does anyone of you know when XCB will be included in all major
> distributions? 

We ship it in Mandriva.

Col

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