David Reveman
2007-Mar-09 13:24 UTC
AW: Re: [compiz] [PATCH] minimize doesn't respect "no core instance" flag
On Fri, 2007-03-09 at 21:47 +0100, Danny Baumann wrote:> Hi, > > Let me ask in a more general way: > > A plugin wants to hide windows by preventing their drawing - that's all group wants to do. > What's the correct way to do that? From my understanding, that's NO_CORE_INSTANCE_MASK. If that's not true, what's the exact meaning of that flag? > Another way to do that would be to just return from paintWindow instead of calling the next plugin, but I think that's a bad solution.NO_CORE_INSTANCE_MASK just prevents the core from drawing it's instance of the window. There's currently no way to prevent other plugins from drawing a window and I'm not sure how an interface for doing that would best look like. - David
Danny Baumann
2007-Mar-09 23:36 UTC
AW: Re: [compiz] [PATCH] minimize doesn't respect "no core instance" flag
Hi,> > A plugin wants to hide windows by preventing their drawing - that's all group wants to do. > > What's the correct way to do that? From my understanding, that's NO_CORE_INSTANCE_MASK. If that's not true, what's the exact meaning of that flag? > > Another way to do that would be to just return from paintWindow instead of calling the next plugin, but I think that's a bad solution. > > NO_CORE_INSTANCE_MASK just prevents the core from drawing it's instance > of the window. There's currently no way to prevent other plugins from > drawing a window and I'm not sure how an interface for doing that would > best look like.OK, if there is no proper way to do that yet and as you have promised we'll have a nice interface for draing hidden windows soon ;-), I'll do it the "unclean" way for now by just returning TRUE from drawWindow instead of calling the next plugin in the chain. I realize there are obvious problems with that (such as the need to be loaded after decoration), but as this solution is only needed for a limited amount of time, it should be good enough. Regards, Danny
Roi Cohen
2007-Mar-10 11:15 UTC
AW: Re: [compiz] [PATCH] minimize doesn't respect "no core instance" flag
Hi, I think the problem is that a window should still be considered as a core instance even if its transformed during the minimizing animation. The minimize plugin breaks the core instance drawing with the NO_CORE_INSTANCE mask, and draws its own instance of the window instead with drawWindow (which skips the NO_CORE_INSTANCE check of core). I think a better solution will be painting the animated window as a transformed version of the core instance. The attached patch fixes this problem. What do you think? Thanks, roico. On 3/9/07, David Reveman <davidr@novell.com> wrote:> On Fri, 2007-03-09 at 21:47 +0100, Danny Baumann wrote: > > Hi, > > > > Let me ask in a more general way: > > > > A plugin wants to hide windows by preventing their drawing - that's all group wants to do. > > What's the correct way to do that? From my understanding, that's NO_CORE_INSTANCE_MASK. If that's not true, what's the exact meaning of that flag? > > Another way to do that would be to just return from paintWindow instead of calling the next plugin, but I think that's a bad solution. > > NO_CORE_INSTANCE_MASK just prevents the core from drawing it's instance > of the window. There's currently no way to prevent other plugins from > drawing a window and I'm not sure how an interface for doing that would > best look like. > > - David > > _______________________________________________ > compiz mailing list > compiz@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/compiz >-------------- next part -------------- A non-text attachment was scrubbed... Name: minimize.diff Type: text/x-patch Size: 1225 bytes Desc: not available Url : http://lists.freedesktop.org/archives/compiz/attachments/20070310/fd0fcc83/minimize.bin