SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2011-11-07 04:10:48

sticky
Member
Registered: 2011-09-15
Posts: 16

new composite manager: compton

Not really a script, but I forked Dana Jansens' version of xcompmgr and added transparent titlebars/window frames, transparency for inactive windows, and shadows on argb windows (e.g. transparent terminals). I also fixed a few things. Openbox is the only window manager I have tested it with so far. It also has menu transparency thanks to Dana. I think this is a good feature set - it's roughly the same feature set the xfce compositor has, except it's standalone. After this, I'm just going to maintain it, and optimize it hopefully.

I'm sure there are people like me out there who are frustrated that there aren't that many options for a standalone compositor, so I figured you guys might be interested: https://github.com/chjj/compton .

Build information is in the github readme.

Offline

Be excellent to each other!

#2 2011-11-07 04:29:09

psyco430404
#! Die Hard
From: Las Vegas, Nevada
Registered: 2011-07-04
Posts: 804

Re: new composite manager: compton

Thank you very much smile, time to purge out dana xD, and ill test this for you.

The fading has the same isues for me as xcompmgr has.
tYjV4aQ
doesnt complete the fade and stops half way through

Also your composite manger has a regression involving fluxbox when you have the menu alpha set though the local configurations.

all in all this looks promising, keep it up smile, hopefully this or FBcompose can get a fully stable version going.

Last edited by psyco430404 (2011-11-07 04:46:32)


"'If fighting is to result in victory, then you must fight'...Sun Tzu said that and id say he knows a little more about fighting then you do pal."

- TF2 Soldier

Offline

#3 2011-11-07 04:53:22

sticky
Member
Registered: 2011-09-15
Posts: 16

Re: new composite manager: compton

psyco430404 wrote:

Thank you very much smile, time to purge out dana xD, and ill test this for you.

The fading has the same isues for me as xcompmgr has.
tYjV4aQ
doesnt complete the fade and stops half way through

Hmm, that's in fluxbox? I didn't really touch the fades code from the original. I wasn't aware there was a well-known problem with fluxbox. I can try to have a look at it.

Also your composite manger has a regression involving fluxbox when you have the menu alpha set though the local configurations.

If fluxbox is setting the semistandard _NET_WM_WINDOW_OPACITY on the toplevel window, opacity shouldn't be a problem for menus (it could be that fb sets opacity on a subwindow, which might make the event not be processed correctly, but I'm not sure). What is the problem with the menu opacity?

all in all this looks promising, keep it up smile, hopefully this or FBcompose can get a fully stable version going.

Thanks, and thank you for testing it.

Offline

#4 2011-11-07 05:02:17

psyco430404
#! Die Hard
From: Las Vegas, Nevada
Registered: 2011-07-04
Posts: 804

Re: new composite manager: compton

Yeah i have had fade issues with every window manger i have tried. I run a 9600 GT with 285 series driver. for the menu opacity issue, its not making all menu windows opaque its only making the main one. dana does this correctly. Sorry for cropping up all these issues, I'm just trying to help you debug lol.

and its no problem lol.


"'If fighting is to result in victory, then you must fight'...Sun Tzu said that and id say he knows a little more about fighting then you do pal."

- TF2 Soldier

Offline

#5 2011-11-07 05:08:52

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 9,728
Website

Re: new composite manager: compton

Testing it on Xfce 4.8 ... Seems to be working well ... getting the following error message that I cannot make heads or tails from

error 3 (Unknown) request 20 minor 0 serial 8963
error 3 (Unknown) request 15 minor 0 serial 8964

VSIDO
If you build it, they will come...
Words That Build Or Destroy

Offline

#6 2011-11-07 05:10:59

sticky
Member
Registered: 2011-09-15
Posts: 16

Re: new composite manager: compton

Ah, you're absolutely right about the menu transparency, it has to do with the fact that GTK (and other) menus appear to be normal windows, so when you focus them, the code I added for the inactive transparency sets their opacity to 100%. I'll look into a way to fix that.

Offline

#7 2011-11-07 05:16:39

sticky
Member
Registered: 2011-09-15
Posts: 16

Re: new composite manager: compton

VastOne wrote:

Testing it on Xfce 4.8 ... Seems to be working well ... getting the following error message that I cannot make heads or tails from

error 3 (Unknown) request 20 minor 0 serial 8963
error 3 (Unknown) request 15 minor 0 serial 8964

Yep, working on that. It happens on CreateNotify events for certain windows. It happens when the X server sends a non-window XID, or override_redirect is set. Chromium tabs cause this when you drag them. It's nothing to worry about though, it's just the X server getting mad. Also, glad to hear it works well on XFWM. smile

Last edited by sticky (2011-11-07 05:18:54)

Offline

#8 2011-11-07 05:20:11

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 9,728
Website

Re: new composite manager: compton

sticky wrote:
VastOne wrote:

Testing it on Xfce 4.8 ... Seems to be working well ... getting the following error message that I cannot make heads or tails from

error 3 (Unknown) request 20 minor 0 serial 8963
error 3 (Unknown) request 15 minor 0 serial 8964

Yep, working on that. It happens on CreateNotify events for certain windows. It happens when the X server sends a non-window XID, or override_redirect is set. Chromium tabs cause this when you drag them. It's nothing to worry about though, it's just the X server getting mad.

Did not seem to be an issue... wanted to report it..

So far so good...

Will keep testing it...

One request is that you perhaps create a very short help file or man file that has the options in it from command line...  I know it is there in man compton, but if someone were looking at it on git, these options would help ppl to see it's functions and understand it better...


VSIDO
If you build it, they will come...
Words That Build Or Destroy

Offline

#9 2011-11-07 05:38:49

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 9,728
Website

Re: new composite manager: compton

Oh...

Very nice job BTW....


VSIDO
If you build it, they will come...
Words That Build Or Destroy

Offline

#10 2011-11-07 19:26:00

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 9,728
Website

Re: new composite manager: compton

I have another minor issue with this for reporting...

When I maximize a window that has been minimized, it stays in its semi transparent state until I physically move the window using the window borders...

I have only used the two settings you provided as samples from the git site and both have the same reaction.

Edit - I suppose this may be the same issue that psyco has already reported...

Last edited by VastOne (2011-11-07 19:28:45)


VSIDO
If you build it, they will come...
Words That Build Or Destroy

Offline

#11 2011-11-07 19:52:32

sticky
Member
Registered: 2011-09-15
Posts: 16

Re: new composite manager: compton

VastOne wrote:

When I maximize a window that has been minimized, it stays in its semi transparent state until I physically move the window using the window borders...

I can't reproduce this with openbox. I'd have to mess around with xfwm to really figure it out.

Also, since no transset-like programs are really maintained I decided to write one, but instead of writing it in C, I decided to write a ridiculous bash script, using only standard X utilities. I think this will be much more maintainable by people since it requires no compilation, and it's only a few lines:

Usage:
by window id: $ trans -w "$WINDOWID" -o 75
by name: $ trans -n "urxvt" -o 75
by current window: $ trans -c -o 75
by selection: $ trans -s -o 75
increment current window 5%: $ trans -c -o +5

#!/bin/bash

# transset in a bash script
# copyright (c) 2011, christopher jeffrey (MIT license)

window=
opacity=
cur=
root=
parent=
active=

while getopts "scn:w:o:" OPTION; do
  case "$OPTION" in
    s) window="" ;;
    c)
      active=$(xprop -root -notype \
        | grep "_NET_ACTIVE_WINDOW:" \
        | sed 's/^.*\(0x\S*\).*$/\1/')
      window="-id $active"
    ;;
    n) window="-name $OPTARG" ;;
    w) window="-id $OPTARG" ;;
    o) opacity="$OPTARG" ;;
  esac
done

parent=$(xwininfo -all $window \
  | grep Parent \
  | sed 's/^.*\(0x\S*\).*$/\1/')

root=$(xwininfo -all -root \
  | grep "Root window id" \
  | sed 's/^.*\(0x\S*\).*$/\1/')

if [ "$parent" != "$root" ]; then
  window="-id $parent"
fi

inc=$(echo "$opacity" | sed 's/^\(+\|-\).*$\|^.*$/\1/')
if [ -n "$inc" ]; then
  cur=$(xprop $window -notype "_NET_WM_WINDOW_OPACITY" \
    | sed 's/^.*\([0-9]\+\).*$\|^.*$/\1/')
  [ -z "$cur" ] && cur=$((0xffffffff))
  cur=$((cur*100/0xffffffff))
  opacity=$(echo "$opacity" | sed 's/\(\+\|\-\)//')
  if [ "$inc" = "+" ]; then
    opacity=$((cur+opacity))
  else
    opacity=$((cur-opacity))
  fi
fi

if [ -n "$opacity" ] && [ -n "$window" ]; then
  [ $opacity -le 0 ] && opacity=0
  [ $opacity -ge 100 ] && opacity=100
  opacity=$((opacity*0xffffffff/100))
  xprop $window -f _NET_WM_WINDOW_OPACITY 32c \
    -set _NET_WM_WINDOW_OPACITY "$opacity"
fi

If anyone can improve on it, that would be good. I've never prided myself in bash scripting.

Offline

#12 2011-11-12 07:08:33

psyco430404
#! Die Hard
From: Las Vegas, Nevada
Registered: 2011-07-04
Posts: 804

Re: new composite manager: compton

Tried out your transset script, thats a really nice alternative to installing a package lol. Also any work done on Compton?


"'If fighting is to result in victory, then you must fight'...Sun Tzu said that and id say he knows a little more about fighting then you do pal."

- TF2 Soldier

Offline

#13 2011-11-13 18:53:40

sticky
Member
Registered: 2011-09-15
Posts: 16

Re: new composite manager: compton

psyco430404 wrote:

Tried out your transset script, thats a really nice alternative to installing a package lol. Also any work done on Compton?

Thanks. I've been messing around getting focus behavior to work better for the inactive window transparency, but I don't know if it is possible to get it to work correctly with every WM (I've also been experimenting with it on Awesome). I've refactored a little bit so opacity fades work better. I haven't pushed it to github yet. Will soon.

Last edited by sticky (2011-11-13 18:53:58)

Offline

#14 2011-11-13 19:40:00

psyco430404
#! Die Hard
From: Las Vegas, Nevada
Registered: 2011-07-04
Posts: 804

Re: new composite manager: compton

Alright thanks for the update, will bug test the new version when it's released.


"'If fighting is to result in victory, then you must fight'...Sun Tzu said that and id say he knows a little more about fighting then you do pal."

- TF2 Soldier

Offline

#15 2011-11-19 05:11:01

sticky
Member
Registered: 2011-09-15
Posts: 16

Re: new composite manager: compton

I made some minor improvements. Focus behavior should be perfect. Fades should work with all transparency changes now but I can't seem to get that perfect. And something else I might've forgotten.

Offline

#16 2011-11-19 09:23:10

psyco430404
#! Die Hard
From: Las Vegas, Nevada
Registered: 2011-07-04
Posts: 804

Re: new composite manager: compton

Alright dude, no mem leaks, no fade issues like i used to have (than you for this), only issue is the transparency, but thats just Fluxbox (ill get over it lol).

All in all very good work. Ill let you know if i come across any issues, but this seems really solid. If you need someone to write man pages or help out in s,mall ways let me know.

EDIT: you still have a slight bug in your unfocused window code.

tYmNuYw

when i use my menu in flux, and then i click another window, the window i click immediately after doesn't return to the full opacity. Thats the only issue tho, and i dont get the glitches i was getting with dana with media play back in mplayer.

Last edited by psyco430404 (2011-11-19 09:31:17)


"'If fighting is to result in victory, then you must fight'...Sun Tzu said that and id say he knows a little more about fighting then you do pal."

- TF2 Soldier

Offline

#17 2011-11-19 09:49:48

sticky
Member
Registered: 2011-09-15
Posts: 16

Re: new composite manager: compton

psyco430404 wrote:

Alright dude, no mem leaks, no fade issues like i used to have (than you for this), only issue is the transparency, but thats just Fluxbox (ill get over it lol).

All in all very good work. Ill let you know if i come across any issues, but this seems really solid. If you need someone to write man pages or help out in s,mall ways let me know.

EDIT: you still have a slight bug in your unfocused window code.

Do you have fades on? The focus behavior for fades isn't perfect yet. If I make the opacity changes fade every time, things seem to play by different rules. (I might just takes the opacity fading out completely).

If anyone can make improvements, I'm always willing to accept pull requests on github.

Offline

#18 2011-11-19 09:56:34

psyco430404
#! Die Hard
From: Las Vegas, Nevada
Registered: 2011-07-04
Posts: 804

Re: new composite manager: compton

Yeah I was running with fades on, tried it with them off and it fixed it. All in all tho very very promising, great work man. Wish I could contribute patches or something to help hmm sorry.


"'If fighting is to result in victory, then you must fight'...Sun Tzu said that and id say he knows a little more about fighting then you do pal."

- TF2 Soldier

Offline

#19 2011-12-08 04:50:40

psyco430404
#! Die Hard
From: Las Vegas, Nevada
Registered: 2011-07-04
Posts: 804

Re: new composite manager: compton

Been running the latest version, working great in openbox, when can we expect the next patch/release


"'If fighting is to result in victory, then you must fight'...Sun Tzu said that and id say he knows a little more about fighting then you do pal."

- TF2 Soldier

Offline

#20 2011-12-10 08:06:48

sticky
Member
Registered: 2011-09-15
Posts: 16

Re: new composite manager: compton

psyco430404 wrote:

Been running the latest version, working great in openbox, when can we expect the next patch/release

I'll probably just be updating it casually. I don't think I'll have formal releases. I try to keep it stable and just push to the github repo whenever I change something.

Offline

#21 2011-12-14 18:58:36

thevdude
#! Junkie
From: Pittsburgh, PA
Registered: 2011-09-01
Posts: 469

Re: new composite manager: compton

Going to try this later, I've had issues with xcompmgr and dual monitors, maybe this will help fix it.

Offline

#22 2012-01-10 13:56:26

agent725
New Member
Registered: 2012-01-10
Posts: 7

Re: new composite manager: compton

Two bugs:
1. When using transparent window decorations, maximised and undecorated windows also get a weird transparency mask applied to them (this makes the menu suddenly partially transparent). (I use undecorated windows when maximised for more screen real estate.) Could you make the compositor check if there actually is a decoration on the window, before making it transparent?
2. The age-old screen-flicker bug when dragging in GTK programs is still there. (Thunar has it, for example.) The root window is then flickered over the entire screen.

For the rest I love this thing! Great replacement for xcompmgr. Thanks for doing the work!

Offline

#23 2012-01-13 00:44:30

sticky
Member
Registered: 2011-09-15
Posts: 16

Re: new composite manager: compton

agent725 wrote:

Two bugs:
1. When using transparent window decorations, maximised and undecorated windows also get a weird transparency mask applied to them (this makes the menu suddenly partially transparent). (I use undecorated windows when maximised for more screen real estate.) Could you make the compositor check if there actually is a decoration on the window, before making it transparent?
2. The age-old screen-flicker bug when dragging in GTK programs is still there. (Thunar has it, for example.) The root window is then flickered over the entire screen.

For the rest I love this thing! Great replacement for xcompmgr. Thanks for doing the work!

Thanks.

1. Unfortunately, as far as I can tell, the only way to check for this is by examining _NET_FRAME_EXTENTS. It really depends on the window manager you're using and whether it conforms to standards by setting that property or not. On the windows your having trouble with, could you show me the output of `xprop | grep _NET_FRAME_EXTENTS`?

2. I've never seen this problem. Are you using some kind of desktop window? or are you literally referring to the root window?

Offline

#24 2012-01-14 23:50:38

agent725
New Member
Registered: 2012-01-10
Posts: 7

Re: new composite manager: compton

1. Actually I meant the following: I scripted openbox so that it removes decoration when a window is maximized to save some screen real estate. The problem arises when I use the '-e' option of compton - then my maximized+undecorated windows get a transparent menubar. This problem would be solved if compton checks if decoration exists on a window first, and then only applying transparency if the decoration is actually there.
(Here's my _NET_FRAME_EXTENTS for Thunar just for good measure. The numbers are the same when Thunar is maximized+undecorated or sized as a normal window. -> _NET_FRAME_EXTENTS(CARDINAL) = 1, 1, 22, 3)

2. Try using compton, openbox and the root window painted with a background (by using nitrogen for example). Make sure to turn off any other background managers (like some filemanagers have) so you can see the picture you have chosen with nitrogen. When using this old fashioned method (root window) to paint a background, the screen flickering occurs when dragging something in GTK (for example dragging a file in Thunar).

Hope this helps. smile

Offline

Help fund CrunchBang, donate to the project!

#25 2012-01-15 06:36:27

sticky
Member
Registered: 2011-09-15
Posts: 16

Re: new composite manager: compton

agent725 wrote:

1. Actually I meant the following: I scripted openbox so that it removes decoration when a window is maximized to save some screen real estate. The problem arises when I use the '-e' option of compton - then my maximized+undecorated windows get a transparent menubar. This problem would be solved if compton checks if decoration exists on a window first, and then only applying transparency if the decoration is actually there.
(Here's my _NET_FRAME_EXTENTS for Thunar just for good measure. The numbers are the same when Thunar is maximized+undecorated or sized as a normal window. -> _NET_FRAME_EXTENTS(CARDINAL) = 1, 1, 22, 3)

2. Try using compton, openbox and the root window painted with a background (by using nitrogen for example). Make sure to turn off any other background managers (like some filemanagers have) so you can see the picture you have chosen with nitrogen. When using this old fashioned method (root window) to paint a background, the screen flickering occurs when dragging something in GTK (for example dragging a file in Thunar).

Hope this helps. smile

1. I've started to work on improving this. I'll see what I can do.

2. I'm not sure, but I was under the impression that nitrogen creates a desktop window instead of drawing to the root window. Personally, I use Feh and I haven't seen this. I'll have to install nitrogen to mess around. Is there anyway you could get a screenshot of the bug?

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo