When used with compiz, neap appears in the systray (tint2) but only shows one desktop (out of 4). Right-click on neap's icon only shows "Desk 1", too.
Config : gnome (2.28.1) -metacity +compiz (0.8.4) +tint2 (0.11) +neap (0.5.2, python-Xlib 0.14-2)
Comment #1
Posted on Oct 28, 2010 by Happy MonkeyMy bad, it's a Tint2 issue (due to compiz issue) : http://code.google.com/p/tint2/wiki/FAQ#Tint2_doesn't_work_on_compiz_correctly?
Comment #2
Posted on Oct 28, 2010 by Happy HorseActually, it's just a Compiz issue. Tint2 merely happens to suffer from the same problem, namely that Compiz doesn't support virtual desktops, simulating them instead.
Anyway, thanks for pointing that out explicitly. Are you using Compiz on a regular basis? I'm asking because I'm aware of this deficiency since I started working on neap, but you're the first user who mentions it.
Comment #3
Posted on Oct 28, 2010 by Happy MonkeyYes, I use it when my laptop is not on battery. Many Linux Mint users probably use it too, since it's present in the default install (maybe in Ubuntu too).
It looks like gnome's pager applet has a few workarounds based on "viewport" (since it's what compiz uses instead of "desktops").
I had a look at the freedesktop docs and tried using _NET_DESKTOP_VIEWPORT messages. It's a horrible hack based on screen resolution and viewport position but it works. The attached the file contains the modified script.
I separated the message-dependent methods in a "pager" class, this may not be the way you want to handle this, but it's quite convenient to see the differences.
I will post a clean version (without hard-coded screen resolution & paging method selection) as soon as I get the time to do it :)
- neap 14.66KB
Comment #4
Posted on Oct 28, 2010 by Happy HorseHmm, given the seemingly large number of Compiz users, it might be a good idea to add Compiz support to neap.
Your changes look good, except that I would probably have made a base "pager" class which contains all basic functionality to interact with the WM (or X), and then derive a "viewport-pager" and a "virtual-desktop-pager" from this base class.
You applied your changes to the latest release version. Unfortunately, the latest SVN version differs slightly (Python setters/getters and more (but not complete) Python3 support). Do you know how to resolve this (using diff/patch) or shall I do it for you?
Paging method selection can probably be done by looking at _NET_DESKTOP_VIEWPORT. If the resulting array just contains the tuple (0,0), we're probably using virtual desktops (or at least it won't do any harm if we assume it).
Comment #5
Posted on Oct 29, 2010 by Happy MonkeyHere you go: - based on the last svn version - Pager base class, derived to VirtualDesktopPager and ViewportPager - auto-detects the pager to use, using _NET_DESKTOP_GEOMETRY (wich returns size) instead of _NET_DESKTOP_VIEWPORT (which returns position, so it'll return (0,0) if the window manager doesn't use viewports for virtual desktops but still supports it for other things)
I also replaced calls to intern_atom() by get_atom(), which does the same thing plus cache, to improve performance.
I think the user should be able to "force" pager selection trough configuration, would you consider adding an option ?
If you're interested, I can continue to work on neap, to add multi-screen support to the viewport pager, maybe windows list support, and improve its performance. I also spotted a potential bug with metacity (not -always?- using _NET_DESKTOP_LAYOUT).
- neap 18.68KB
Comment #6
Posted on Oct 29, 2010 by Happy HorseYour code looks great! Thank you very much.
I think it's a good idea to add an option to the configuration file which enables the user to force a specific pager. Maybe something along the lines of "pager = ".
I'd be happy to see you join neap development, of course. If you agree, I'll add you to the list of developers, which gives you write access to the SVN repo. Is that OK for you?
Comment #7
Posted on Oct 29, 2010 by Happy MonkeySure. The amount of time I can spend on coding personal stuff is quite limited, but I'd be happy to help :)
Comment #8
Posted on Oct 29, 2010 by Happy HorseYou are now a project committer. Under the "Source" tab, you'll find instructions on what to do next.
I didn't commit your changes so far, so you can do it yourself, properly preserving credits.
Happy hacking! :)
Comment #9
Posted on Oct 29, 2010 by Happy MonkeyThank you :)
Commit done. I will update the documentation when the remaining bugs with the viewport pager (multi-screen and perf) are resolved and the configuration option is added.
Comment #10
Posted on Oct 29, 2010 by Happy HorseBy documentation, you mean the ChangeLog file?
Comment #11
Posted on Oct 29, 2010 by Happy MonkeyI mean the help message (for the new option), and maybe add a page to the wiki explaining what viewport is and how it is used by compiz. Might be interesting for other pagers' devs or power users.
Comment #12
Posted on Oct 29, 2010 by Happy Bird@clavoillotte:
Definitely. If I can ever find time to finish my WinSplit Revolution clone, that'd probably be useful to me.
Comment #13
Posted on Oct 30, 2010 by Happy Horseclavoillotte: I love you ;)
When you're committing changes to the code, could you please also do the following things:
- update the ChangeLog file
- increase the version number (currently line 24 in neap)
Version numbers are major.minor.revision, where currently "major" is always 0, "minor" is incremented with each new feature, and "revision" gets incremented with each new fix.
I fixed it this time; the new neap version is now 0.6.0
BTW, we have two mailing lists: neap-dev-announce is read-only and serves as a hub for Google Code messages (e.g. commits, issues) while neap-dev is the developer mailing list (which hasn't had a single post yet).
Do you want me to put you on any of those lists?
Comment #14
Posted on Oct 30, 2010 by Happy MonkeyBoth please.
I added a line to the ChangeLog about the replacement of intern_atom by get_atom.
Comment #15
Posted on Oct 30, 2010 by Happy HorseYou're now a member of both.
Comment #16
Posted on Nov 1, 2010 by Happy Horse(No comment was entered for this change.)
Status: Fixed
Labels:
Type-Enhancement
Priority-Medium