[compiz] A patch for minimize plugin.
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] Irritating reloading
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] Irritating reloading
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? Stjepan ___ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz
Re: [compiz] keybindings patch, gnome-keybinding-bridge and vignettes plugins
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] Annoying Scale and DnD behaviour
> 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] Annoying Scale and DnD behaviour
Current behavior terminates scale when not moving cursor _between windows_. Shouldn't scale be terminated only when not moving cursor _at all_ for the specified time? Stjepan ___ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz
Re: [compiz] Switcher autorotate
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
[compiz] Get window textures even when they're transformed.
If I wobble a window and quickly initiate switcher or cube, this can cause weird artifacts. I had a look at Beryl's switcher.c In switchPaintThumb they use this: static void switchPaintThumb(...) { DrawWindowGeometryProc oldDrawWindowGeometry; AddWindowGeometryProc oldAddWindowGeometry; WindowPaintAttrib sAttrib = *attrib; int wx, wy; float width, height; CompIcon *icon = NULL; /* Wrap drawWindowGeometry to make sure the general drawWindowGeometry function is used */ oldDrawWindowGeometry = w->screen->drawWindowGeometry; w->screen->drawWindowGeometry = getBaseDrawWindowGeometry(); oldAddWindowGeometry = w->screen->addWindowGeometry; w->screen->addWindowGeometry = getBaseAddWindowGeometry(); .. calulating and painting ... w->screen->drawWindowGeometry = oldDrawWindowGeometry; w->screen->addWindowGeometry = oldAddWindowGeometry; } Why Compiz's switcher.c doesn't use this? Stjepan ___ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz
[compiz] New configuration system
I see many people hate Compiz (and use Beryl) just because it needs gconf + many other GNOME deps. I think this is the biggest advantage of Beryl over Compiz. Yes, users don't have to compile compiz with gconf, but how will they configure things? They'll modify the sources? Compiz needs a new configuration plugin. A text-based one, independent of tons of libraries would be great. Stjepan ___ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz
Re: [compiz] Thumbnail plugin
On Thu, 2007-01-18 at 14:51 -0500, David Reveman wrote: > Being able to draw minimized windows will be solved when the server can > do input transformations. Window map state and window minimize state > will then be separated and map state will just be used as a way to save > some server resources. > > So live updating thumbnails without using any additional resources will > be possible eventually. I'm not very interested in hacking up some > temporary solution before we have input transformation support in the > server. Just be patient, eventually it's going to work perfectly. > Beryl has support for getting thumbnails in it's core. Their both thumbnail and switcher plugin can show thumbs of minimized window. All I can say is that looks and works much better than in Compiz. Vista does the same thing. Isn't it be better to show a saved pixmap instead of an icon or nothing? This is just useful and if you don't like it, it can still be just an option. What do you think? 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
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
[compiz] Switcher autorotate
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
Re: [compiz] Thumbnail plugin
> 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] Thumbnail plugin
Tommorow I'll make a new version. It will just use patched libwnck/kdebase as this is the clean way. This way it'll be very bug-free. David, do you have any plans to put this plugin into the main compiz GIT repository? If you do this, I'll add a bug report to GNOME devs and request the patch to be included in libwnck. Panel apps (gnome-panel, kicker, xfce4-panel) change the property to request a thumbnail. The plugin draws it (even with window decorations). This is the best way of functioning I can think of. I also made a version which draws thumbnails with no interaction with the panel. This results in buggy and hacky code. There's no doubt the first way is better. If you don't think it's good enough to be in the main repository, tell me why. 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
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
Re: [compiz] Patch: switcher's window is a splash window
On Fri, 2006-12-29 at 00:02 +0100, David Reveman wrote: > On Thu, 2006-12-28 at 22:14 +0100, Stjepan Glavina wrote: > > Hi, > > > > I made a simple patch which makes switcher's window a splash window > > (_NET_WM_WINDOW_TYPE_SPLASH). This way I can easily add effects for it. > > The window is a splash window, so why not use this type instead of > > Unknown? Beryl's switcher window is a Splash window too. Is there a > > reason why Compiz uses Uknown for it? > > Splash window type indicates that the window is a splash screen > displayed as an application is starting up. I wouldn't say that this is > what the switcher window is. To me it seems like the switcher window > better match the behavior of a parentless dialog or the new notification > window type. > > A non-override-redirect window without a type hint should be considered > of type Normal, according to the EWMH spec. So as long as I'm not > convinced that some other type than Normal is more correct, I wont be > setting that hint. > > You can always look for the "_SWITCH_SELECT_WINDOW" hint if you really > need to determine if a window is a switcher window. > > -David > > Can switcher's window be of any type so that we can easily add effects to it (like wobbly or fade)? Maybe Utility? Stjepan ___ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz
[compiz] Thumbnail plugin
Hi, With some help from Quinn_Storm, iXce, maniac103, mikedee and KristianLy :), I've managed to modify switcher.c and make a new plugin: thumbnail. The plugin shows thumbnails of windows when cursor is moved over a task button in taskbar. Screenshot: http://pix.nofrag.com/b0/7a/051d45e25bfffed09eeb9b00e383.jpeg Download: http://forum.go-compiz.org/viewtopic.php?t=377&postdays=0&postorder=asc&start=0 David, what do you think about it? Is it good enough to be moved into official compiz repository? Stjepan ___ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz
Re: [compiz] Put a window on top
On Fri, 2007-01-05 at 18:27 +0100, David Reveman wrote: > On Fri, 2007-01-05 at 11:41 +0100, Stjepan Glavina wrote: > > 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? > > You can set window type to Dock and add StateAbove. > > -David > It works fine with this, thanks. Stjepan ___ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz
[compiz] Put a window on top
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] Get pixmap of minimized windows?
Is it possible to get pixmaps of minimized windows? I don't want to use ugly hacks like "temp unminimize" just to get it. Stjepan ___ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz
[compiz] Vide: bug with minimize+wobbly
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] next release
On Fri, 2006-12-29 at 10:39 +0100, dragoran wrote: > I don't know if this is known or not but chaning the resultion while > compiz is running (using randr or nvidia-settings) result into a weird > looking screen (first half black; second half compiz but flickering. > When metacity is used it works fine. If I change it before starting > compiz it works fine too. Yes I have the same problem. ___ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz
Re: [compiz] Sane value for Number of Desktops?
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
[compiz] Patch: switcher's window is a splash window
Hi, I made a simple patch which makes switcher's window a splash window (_NET_WM_WINDOW_TYPE_SPLASH). This way I can easily add effects for it. The window is a splash window, so why not use this type instead of Unknown? Beryl's switcher window is a Splash window too. Is there a reason why Compiz uses Uknown for it? Patch: --- switcher.c 2006-12-28 10:14:52.0 +0100 +++ switcher_new.c 2006-12-28 10:16:40.0 +0100 @@ -799,6 +799,13 @@ XA_ATOM, 32, PropModeReplace, (unsigned char *) state, nState); } + + Atom type; + type = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_SPLASH", 0); + XChangeProperty(dpy, ss->popupWindow, + XInternAtom (dpy, "_NET_WM_WINDOW_TYPE", 0), + XA_ATOM, 32, PropModeReplace, + unsigned char *)&type, 1); if (!ss->grabIndex) ss->grabIndex = pushScreenGrab (s, s->invisibleCursor, "switcher"); -- Stjepan ___ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz