You are not logged in.

#1 2005-07-13 18:10:05

aquila_deus
Member
From: Taipei
Registered: 2005-07-02
Posts: 348
Website

translucent windows in xfce

In xfwm4-4.3.0/src/compositor.c

Translucent Windows

under:

static void
add_win (DisplayInfo *display_info, Window id, Client *c, guint opacity)
{
    ScreenInfo *screen_info = NULL;
    CWindow *new;

add:

    if (c && c->type == WINDOW_DESKTOP)
      opacity = 0xFFFFFFFF;
    else if (c && (c->type == WINDOW_DIALOG || c->type == WINDOW_MODAL_DIALOG))
      opacity = 0xC7777777;
    else if (c && FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_BORDER))
      opacity = 0xBFFFFFFF;
    else
      opacity = 0xC3333333;

Shadow All Windows

Replace:

    if ((cw->mode != WINDOW_ARGB)
        && (( c && (screen_info->params->show_frame_shadow) && FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_BORDER))
         || (!c && (screen_info->params->show_popup_shadow) && !(cw->shaped))))

With:

    if (1)

screenshot: http://www.aquila-deus.no-ip.org/opera.png

xfwm-4.3.0 snapshot: http://www.xfce.org/~olivier/preview/

Offline

#2 2005-07-13 23:31:57

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,835

Re: translucent windows in xfce

If I want to do this, do I still need

Section "Extensions"
        Option "Composite"      "Enable"
 EndSection

in xorg.conf? What about xapps/xcompmgr? And the most important question - how's the performance? I would have been so chuffed with this kind of stuff last time I tried it - except for the fact that I'm not a snail. wink

Offline

#3 2005-07-14 05:15:55

aquila_deus
Member
From: Taipei
Registered: 2005-07-02
Posts: 348
Website

Re: translucent windows in xfce

tomk wrote:

If I want to do this, do I still need

Section "Extensions"
        Option "Composite"      "Enable"
 EndSection

in xorg.conf? What about xapps/xcompmgr? And the most important question - how's the performance? I would have been so chuffed with this kind of stuff last time I tried it - except for the fact that I'm not a snail. wink

You don't need xcompmgr - Xfwm has a built-on one (the compositor.c), you just need to configure --enable-compositor

Performance is almost as fast as normal desktop, but you must use nvidia's video card and the offical driver (and enable RenderAccel), without the driver it would be 10x slower.

Firefox scrolling is buggy with compositing, so use opera or konqueror. And KDE and Gtk apps will sometimes mess up when you create new window (shade/unshade or switch desktop can restore it)

Offline

#4 2005-07-14 05:46:02

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: translucent windows in xfce

You still need it enabled with your xorg.conf.

Offline

#5 2005-07-14 07:19:44

aquila_deus
Member
From: Taipei
Registered: 2005-07-02
Posts: 348
Website

Re: translucent windows in xfce

iphitus wrote:

You still need it enabled with your xorg.conf.

Hey, you are the one on #archlinux? smile

Offline

#6 2005-07-14 08:29:59

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: translucent windows in xfce

aquila_deus wrote:
iphitus wrote:

You still need it enabled with your xorg.conf.

Hey, you are the one on #archlinux? smile

Yup!

Offline

#7 2005-07-14 11:04:17

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: translucent windows in xfce

nice hack, is there a way to make focus windows opaque?

Offline

#8 2005-07-14 11:31:06

aquila_deus
Member
From: Taipei
Registered: 2005-07-02
Posts: 348
Website

Re: translucent windows in xfce

cmp wrote:

nice hack, is there a way to make focus windows opaque?

KDE does it (not kompmgr, maybe KDE's wm?), but it's not easy in xfce.

Now I just want the title bar to be less opaque.

Offline

#9 2005-07-14 13:30:01

aquila_deus
Member
From: Taipei
Registered: 2005-07-02
Posts: 348
Website

Re: translucent windows in xfce

I just got the transparent titlebar to work. But the height of less opaque part must be hard-coded, as there is no easy way to find out where the titlebar widget is exactly in compositor.c.

Screenshot => http://www.aquila-deus.no-ip.org/ttitle.png (look at "The GIMP")

It's not very amazing compared to longhorn's or OSX's, because their method require the apps themselves to setup opacity for proper widgets, rather than using a compositor which knows nothing about app windows.

I also tried to make all windows gradient... But the performance sux ass.

Offline

Board footer

Powered by FluxBB