linuxmint / muffin

The window management library for the Cinnamon desktop (libmuffin) and its sample WM binary (muffin)
GNU General Public License v2.0
197 stars 93 forks source link

Can't get X11 workspace properties (_NET_NUMBER_OF_DESKTOPS) #173

Closed fnadde42 closed 9 years ago

fnadde42 commented 9 years ago

I tried to use a application which checks which workspace the user is currently on to decide how long this workspace have been active.

It's designed to utilize X11s built in functions for getting the number of rows and columns as well as the current open workspace. This seems to work in XFCE, KDE and a few other window managers but not when it comes to Muffin (which I run on my vanilla Linux Mint 17.1 Rebecca).

Since this works in many of the other window managers and is a built in function in X11 this should be implemented into Muffin.

https://github.com/Hoglet/TimeIT/blob/master/src/Logic/Workspace.cpp#L8

mtwebster commented 9 years ago

Strange, it seems to be set in the root window:

mtwebster:~/bin/muffin[master*]> xprop -root | grep NET_NUMBER_OF_DESKTOPS
_NET_NUMBER_OF_DESKTOPS(CARDINAL) = 2

That is done here: https://github.com/linuxmint/muffin/blob/master/src/core/screen.c#L1419

mtwebster commented 9 years ago

Looks like we don't set _NET_DESKTOP_LAYOUT though, I suppose that's the issue.

fnadde42 commented 9 years ago

@mtwebster Is it easily fixed? This is really important for me cause I don't want to have to get rid of Cinnamon and get another window manager :/

mtwebster commented 9 years ago

Should be - all of the plumbing is there, we just never set it. I'll see what I can do in the next few days - it won't warrant a version though, you'll be stuck building it probably, for a time.

mtwebster commented 9 years ago

Fixed by https://github.com/linuxmint/muffin/compare/77b68faf4371...20cecf044695

I tested with TimeIT - I went as far as adding a task, where it would show the workspace names. I'll attempt to get this included in a 2.4.x update, but I can't guarantee it - let me know if you want to try to build instead.

fnadde42 commented 9 years ago

@mtwebster You are a star mate! I thought about this and it might be worth for Muffin-team to take a look at the other variables in Xlib. My problem was specifically with workspaces but Muffin should have full compatibility to work with Xlib.

Anyway, Thanks for the fix. I'll try to make this work.

fnadde42 commented 9 years ago

I downloaded the master and installed it but when I rebooted and logged in Cinnamon crashed. However, TimeIt seems to recoginze now the workspaces so that's good. But I can't really call this a win since everything else looks like crap xD. I don't know how to fix it or how to reverse it.

I don't know where to find crash-logs or what to attach to this post so I just copied the syslog if it helps. Here is the syslog from two diffrent startups.

petkar@fnadde42 ~ $ tail -f /var/log/syslog
Mar 12 20:42:58 fnadde42 cinnamon-session[2051]: WARNING: Application 'cinnamon.desktop' killed by signal 15
Mar 12 20:42:59 fnadde42 cinnamon-session[2051]: WARNING: App 'cinnamon.desktop' respawning too quickly
Mar 12 20:42:59 fnadde42 cinnamon-session[2051]: CRITICAL: We failed, but the fail whale is dead. Sorry....
Mar 12 20:43:00 fnadde42 cinnamon-session[2051]: WARNING: App 'cinnamon.desktop' respawning too quickly

petkar@fnadde42 ~ $ tail -f /var/log/syslog
Mar 13 07:20:08 fnadde42 anacron[1316]: Normal exit (1 job run)
Mar 13 07:24:07 fnadde42 kernel: [  556.173732] traps: notification-da[2742] trap int3 ip:7fa50b243c13 sp:7fff229e8a30 error:0
Mar 13 07:30:01 fnadde42 CRON[3412]: (root) CMD (start -q anacron || :)
Mar 13 07:30:01 fnadde42 anacron[3415]: Anacron 2.3 started on 2015-03-13
Mar 13 07:30:01 fnadde42 anacron[3415]: Normal exit (0 jobs run)
Mar 13 07:39:01 fnadde42 CRON[3436]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $(/usr/lib/php5/maxlifetime))
Mar 13 07:59:54 fnadde42 cinnamon-screensaver-dialog: pam_ecryptfs: seteuid error
Mar 13 08:09:01 fnadde42 CRON[3624]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $(/usr/lib/php5/maxlifetime))
Mar 13 08:17:01 fnadde42 CRON[3781]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar 13 08:39:01 fnadde42 CRON[3884]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $(/usr/lib/php5/maxlifetime))

fnadde42-cinnamon-crash-after-muffin-nightly-update

mtwebster commented 9 years ago

What did you upgrade? You won't be able to upgrade just muffin, need to grab all the updated packages from the cinnamon source package also.

fnadde42 commented 9 years ago

Woops. You mean this link? https://github.com/linuxmint/Cinnamon/archive/master.zip

mtwebster commented 9 years ago

Yes (or clone the cinnamon repo) - once in there just use 'dpkg-buildpackage' (all cinnamon-related repos build this way in mint/ubuntu/debian) - or you can download the nightly here: https://launchpad.net/~gwendal-lebihan-dev/+archive/ubuntu/cinnamon-nightly/+packages (just get the trusty version)

fnadde42 commented 9 years ago

@mtwebster Sweet! It seems to work. Cinnamon is a bit more unstable (which is to expect from a nightly build) but TimeIt works and is functional. Thanks a bunch.