aboutsummaryrefslogtreecommitdiff
path: root/src/fluxbox.cc
AgeCommit message (Collapse)AuthorFilesLines
2013-02-18Move declarations of Resource enums to a separate filePavel Labath1-1/+1
The reason for this is that I need to access those enums from fluxbox-update_configs and I don't want to #include and link everything in src. I also merged Slit::Placement, Toolbar::Placement and FbWinFrame::TabPlacement into one enum.
2013-02-18Don't create a new lua state upon reconfigurePavel Labath1-3/+0
As we integrate lua more and more into the core of fluxbox, it's going to progressively harder to update all things that reference to the old state. Furthermore, I would like to completely drop the reconfiguration at some point, after I'm finished with making sure that all resources use the modifiedSig signal to update automatically.
2013-02-18Move most of the resource loading code into ResourceManager_basePavel Labath1-1/+7
I mostly do this to avoid code duplication between fluxbox and fluxbox-update_configs.
2013-02-18Automatically save init file when a resource is modifiedPavel Labath1-1/+1
previously, init was autosaved only when a resource was modified using the menu. I have also included modifications through lua code. To avoid wasting resources, the file is not saved immediately, but with a 5 second delay (to enable saving a bunch of changes in one go)
2013-02-18Refactoring: move details if init file loading into LResourceManagerPavel Labath1-21/+1
2013-02-18Create a completely new lua state upon USR2 reconfigurePavel Labath1-20/+8
This way, global variables set by the scripts don't persist between hard reconfigures. I also cleaned up the reconfig-handling code in fluxbox.cc. Instead of three reconfig functions (real_reconfig, timed_reconfig, reconfig) we have just one.
2013-02-18Rename new config files to <foo>.luaPavel Labath1-2/+2
2013-02-17Attach a modifiedSig handler to the session.styleOverlay resourcePavel Labath1-0/+1
2013-02-17Attach a modifiedSig handler to the session.styleFile resourcePavel Labath1-3/+5
2013-02-17Add RangeTraits class which automatically clamps the value of resourcesPavel Labath1-19/+14
and start using it.
2013-02-17Attach a modifiedSig handler to the session.keyFile resourcePavel Labath1-2/+0
2013-02-17Attach a modifiedSig handler to the session.appsFile resourcePavel Labath1-1/+0
2013-02-17Attach a modifiedSig handler to the session.forcePseudoTransparency resourcePavel Labath1-3/+2
2013-02-17use Lua::registerInitFunction to simplify some parts of codePavel Labath1-1/+2
2013-02-17Change default rootmenu file namePavel Labath1-1/+1
2013-02-17Fallback to loading of system-wide init file if loading of user's failsPavel Labath1-13/+15
2013-02-17Convert slitlist from a separate file to a regular lua resourcePavel Labath1-8/+0
2013-02-17Remove an unused variablePavel Labath1-1/+0
2013-02-17Make session.screenX.workspace_names a real FbTk::ResourcePavel Labath1-79/+0
instead of the add-on hack it was. This also fixes a lot of problems with saving of config.
2013-02-16Replace ResourceManager with the lua versionPavel Labath1-27/+11
Loading of an init file with the new manager works ok. Saving and restarting is still not completed. This touches many files because i removed the alternative name of resources. Unlike Xrm, lua does not have native support for alt names. It should be fairly easy to add them, but I think that is unnecessary and would be confusing.
2013-02-16Factor out "session." from resource namesPavel Labath1-21/+21
this reduces typing and it makes more sense in lua, since there the resources are implemented as hierarchical tables and the topmost table has to be handled a bit specially.
2012-12-12Minor cleaning of 'class Fluxbox'Mathias Gumz1-2/+3
2012-12-12Fix build regression: enable XRANDR support by defaultMathias Gumz1-16/+33
The changes made in b178bed60b5bd8b2c9ed0cbc67fd729ff3820589 used the wrong variable to set the default state of '--enable-randr' in configure.in, that is fixed now. I also removed '--enable-randr12': If support for the Xrandr-extension is available at compile time we set HAVE_RANDR; if there is also support for Xrandr-1.2 (or higher), we also set HAVE_RANDR1_2 automatically. Other changes: * cleaned out public interface of 'class Fluxbox' * added 'RANDR' to output of 'fluxbox -info'
2012-12-05Simplified 'configure' / build systemMathias Gumz1-5/+5
* reduced duplicated auto-code * renamed '--enable-newwmspec' to '--enable-ewmh' * don't compile 'Slit'-code when '--disable-slit' * use AS_IF() in configure.in * use AS_HELP_STRING() instead of obsolete AC_HELP_STRING in configure.in * removed redundant calls to 'imlib2-config' to fill in $IMLIB2_CFLAGS and $IMLIB2_LIBS, AC_PATH_GENERIC() does that out of the box already
2012-08-28changed timing functions to use a monotonic increasing clockMathias Gumz1-3/+8
gettimeofday() is subject to be changed on daylight-saving or to ntp-related (think leap-seconds). even worse, it is subject to be changed BACK in time. this is hard to fix correctly (see commit 45726d3016e and bug #3560509). it is irrelevant for timers to know the nano-seconds since the epoch anyways.
2012-01-04Pre-increment non-primitive types.Ryan Pavlik1-6/+6
Found with cppcheck: "Prefix ++/-- operators should be preferred for non-primitive types. Pre-increment/decrement can be more efficient than post-increment/decrement. Post-increment/decrement usually involves keeping a copy of the previous value around and adds a little extra code."
2011-10-31fluxbox.cc: ifdef the signals windows doesn't have.Ryan Pavlik1-1/+8
2011-10-31fluxbox.cc: check HAVE_SYS_WAIT_HRyan Pavlik1-0/+2
2011-10-17removed obsolete handler for the gnome-window manager hintsMathias Gumz1-6/+0
nowadays every app should use the extended window manager hints exclusively.
2011-09-14Fix compilation with intel's compilerfixesPavel Labath1-4/+0
the deleted function was never used, otherwise it would generate an error with other compilers as well. icc noticed that it was nonsensical even when it wasn't used and complained.
2011-05-10Convert FluxboxWindow::layerSig to FbTk::SignalPavel Labath1-20/+6
2011-05-10Convert FluxboxWindow::stateSig to FbTk::SignalPavel Labath1-25/+24
2011-05-10Convert FluxboxWindow::workspaceSig to FbTk::SignalPavel Labath1-4/+6
2011-05-10Convert Focusable::dieSig to FbTk::SignalPavel Labath1-32/+37
2011-03-23compile fix: sunCC 5.11 (sunstudio 12) compiles and links againMathias Gumz1-1/+1
biggest change: renaming of 'class Layer' to 'class ResourceLayer' in Layer.hh to handle complaints about 'ambiguous Layer: Layer or FbTk::Layer'. 'ResourceLayer' sounds crappy, but that was the best I could come up with right now.
2011-02-23renamed FbTk::XLayer to FbTk::Layer and FbTk::XLayerItem to FbTk::LayerItemMathias Gumz1-1/+1
2010-09-19pushed to early ...Mathias Gumz1-16/+64
2010-09-18changed the way we create the '~/.fluxbox' directory to avoid race conditionsMathias Gumz1-87/+16
before bringing up the first instance of Fluxbox we prepare the directory and the files it needs. if the config version of exiting files is lower than what we expect, we upgrade the config files. after that we bring up Fluxbox. the old way was problematic because setupConfigFiles() calls 'fluxbox-update_configs' which does its job in the background while fluxbox continues to boot. 'fluxbox-update_configs' sends a USR2 signal to the booting fluxbox (it might even be finished, no one knows) which triggers 'load_rc()' which triggered 'setupConfigFiles()' again which might trigger 'fluxbox-update_configs' again (on my machine 'fluxbox-update_configs' was called 3 times and left a pretty crippled 'keys' file when it was done). bootstrapping before bringing up fluxbox resolves the issue. as a bonus: no need to send USR2 to fluxbox to reload the config file because fluxbox has not even tried to read it yet.
2010-09-18cosmeticMathias Gumz1-8/+14
2010-09-15code deduplication by using <algorithm> and FbTk/STLUtil.hhMathias Gumz1-98/+38
2010-09-14bugfix: small typo in last cleanup prevented loading workspace namesMathias Gumz1-1/+1
2010-09-13cosmetic code cleaningMathias Gumz1-37/+30
* use FbTk::StringUtil::number2String() to avoid 'sprintf' * use FbTk::Util::clamp() * use FbTk::STLUtil::destroyAndClear() * whitespaces
2010-09-13code simplificationMathias Gumz1-59/+42
we do not need a std::map just to store an attribute on an AtomHandler, it makes housekeeping just more annoying.
2010-09-13code simplificationMathias Gumz1-56/+28
2010-09-11updated config version to '13' and adjusted 'fluxbox-update_configs' accordinglyMathias Gumz1-1/+1
our users should migrate seamlessly to our new windows-cycling behaviour without losing their current way of doing things. so, 'fluxbox-update_configs' tries its best to add '(workspace=[current])' wherever it looks like a valid place for it. such changed lines are marked by '!! FBCV13' at the end and can be easily spotted in case the updater got it wrong. addtional changes: * added '-check' to 'fluxbox-update_configs' to check the version number in '~/.fluxbox/init' vs. the version number of 'fluxbox-update_configs' * moved the update-code for each version into its own function, easier housekeeping
2010-09-09simpler codeMathias Gumz1-4/+1
2010-09-09minor cleanupMathias Gumz1-1/+1
2010-09-08simpler way of expressing 'Singleton' for 'FbAtoms'Mathias Gumz1-1/+1
2010-08-20implemented 'ActivateTab' action to (re)allow activation of tabs via mouseMathias Gumz1-1/+1
2010-05-05upgrade CONFIG_VERSION to 11Mathias Gumz1-1/+1