Commit graph

160 commits

Author SHA1 Message Date
Mathias Gumz
bb013f5c75 fix compiler warning about std::auto_ptr
fluxbox uses std::unique_ptr<> where it previously used std::auto_ptr<>.

C++0X was approved in 2011. among other things, it deprecates std::auto_ptr.
5 years is long enough for compilers to catch up the standard.
2016-08-28 19:49:30 +02:00
Thomas Lübking
bccb185cd9 reconfigTheme's on loading a new style
Also reconfigure menus (recursively) on style load
The most critical call is the shape update - the menus often become
cut-off, preventing mouse interaction with lower items, but also colors
are not applied correctly to menus w/o updating them.

BUG 1022 is most likely this and only a misinterpretation (for the
mentioned items are those with lacking color updates on style updates)

BUG: 1146
BUG: 1017
CCBUG: 1022
2016-07-30 18:22:49 +02:00
Mathias Gumz
0da4be2a01 Feature: different MenuSearch modes
Fluxbox now supports three MenuSearch modes:

* NoWhere - essentially "disabling" the menu search.
* Somewhere - the search string matches somewhere.
* ItemStart - the search string matches at the start of a menu item.

The default value is "ItemStart", just in the good old times. As long as
this feature is not configurable via the menu it would irritate users
with distinct muscle memory who type without thinking OR checking the
visual feedback: they would trigger items they did not intent to trigger
after years of the old behavior.

Once this feature get's an entry in the config menu the default value
might change.
2015-02-05 21:30:44 +01:00
Mathias Gumz
ab2eef4937 Add -no-slit and -no-toolbar flags
Sometimes fluxbox is used as a component of a desktop environment (
e.g., the "Lumina Desktop"). It's easier and more stable for this kind
of "users" to disable the toolbar or the slit alltogether. Why not
configure these features out? Because then they would need 2 installations
of fluxbox: One without the slit and the toolbar (and perhaps other
components) and one with them.

This implements feature request #314, at least partially.

This commit also looks bigger than it actually is: I refactored and cleaned
up classes Fluxbox and BScreen.
2015-01-22 16:28:53 +01:00
Mathias Gumz
617635f8eb fix excessive loading of keys file caused by xmodmap
xmodmap (and other tools) trigger MappingNotify events. a single xmodmap
expression such as "keycode comma = comma semicolon" might trigger 4 or 5
MappingNotify events. loading the keys file on each of them is quite
unefficient.

fluxbox now uses a (250ms) timer which is reset upon further events.
2014-04-09 22:40:13 +02:00
Mathias Gumz
43bdf499d5 Fix race condition on shutdown
This commit fixes primarily a race condition that occurs when xinit(1) shuts
down: by not acting properly fluxbox gets caught in an infinite loop. It
caused bug #1100.

xinit(1) sends a SIGHUP signal to all processes. fluxbox tries to shutdown
itself properly by shutting down workspaces and screens. While doing that, the
Xserver might be gone already. Additionally, fluxbox used to restart() itself
on SIGHUP, which is clearly not the right thing to do when xinit(1) is about
to end the session.

So, fluxbox does this:

* handling SIGHUP now shuts down fluxbox without clearing workspaces and
  screens.

* A 2 second alarm() is triggered in Fluxbox::shutdown() as a last resort

* XSetIOErrorHandler() is used to recognize the disconnect from the xserver.

* SIGUSR1 is for restarting fluxbox, SIGUSR2 for reloading the config

* FbTk/SignalHandler.cc/hh is gone; this unused abstraction served currently
  no real purpose. Signal handling is now done in main.cc

* Unrelated to the issue itself src/main.cc was trimmed down quite a bit and
  the code (responsible for handling the command line interface) was moved to
  src/cli*
2014-02-18 19:34:35 +01:00
Mathias Gumz
95f8f33c90 Minor cleaning of 'class Fluxbox' 2012-12-12 10:19:09 +01:00
Mathias Gumz
4191cbf2d2 Fix build regression: enable XRANDR support by default
The changes made in b178bed60b 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-12 10:18:20 +01:00
Pavel Labath
6a0280aa4d Convert FluxboxWindow::layerSig to FbTk::Signal 2011-05-10 13:00:46 +02:00
Pavel Labath
e53d14e910 Convert FluxboxWindow::stateSig to FbTk::Signal 2011-05-10 13:00:46 +02:00
Pavel Labath
4f89009c9e Convert FluxboxWindow::workspaceSig to FbTk::Signal 2011-05-10 13:00:45 +02:00
Pavel Labath
129bac1e0f Convert Focusable::dieSig to FbTk::Signal 2011-05-10 13:00:45 +02:00
Mathias Gumz
0ef76292c5 changed the way we create the '~/.fluxbox' directory to avoid race conditions
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-18 17:51:30 +02:00
Mathias Gumz
deb6a1ebf4 code simplification
we do not need a std::map just to store an attribute on an AtomHandler,
it makes housekeeping just more annoying.
2010-09-13 22:04:24 +02:00
Henrik Kinnunen
2fcc0fd9e7 Changed workspace area signal to use the new signal system 2008-09-28 16:00:48 +02:00
Henrik Kinnunen
bcf37890b6 Change focused signal to use the new signal system 2008-09-28 10:46:49 +02:00
Henrik Kinnunen
52e22a0304 Changed client list signal in BScreen to use the new signal system 2008-09-21 19:32:40 +02:00
Henrik Kinnunen
71674739ec Changed workspace names signal in BScreen to use the new signal system 2008-09-21 15:25:47 +02:00
Henrik Kinnunen
86819abab9 Changed current workspace signal in BScreen to use the new signal system 2008-09-21 13:44:48 +02:00
Henrik Kinnunen
2f4db57898 Changed workspace count signal in BScreen to use the new signal system. 2008-09-18 22:27:16 +02:00
Mark Tiefenbruck
f1ff5ff3b2 add -sync command line option for debugging X issues 2008-08-22 06:12:01 -07:00
Mark Tiefenbruck
72fd5e03a4 revert focus when closing dialogs 2008-08-16 06:30:09 -07:00
Mark Tiefenbruck
1a54fbc67d move default window menu to ~/.fluxbox/windowmenu 2008-06-19 20:48:26 -07:00
Mark Tiefenbruck
dcdc783324 only reload the keys file if the contents have changed 2008-05-12 12:16:37 -07:00
Mark Tiefenbruck
93b0c5322a refactor menu reloading, added FbTk::AutoReloadHelper 2008-05-11 17:22:40 -07:00
Mark Tiefenbruck
a9fd0f5b26 remove some more useless code 2008-05-11 08:54:18 -07:00
Mark Tiefenbruck
f66d446a94 move some stuff from Fluxbox to BScreen 2008-01-11 22:36:38 -08:00
Mark Tiefenbruck
9c105111d2 remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
Mark Tiefenbruck
7588fc10a6 fix some flickering on focus change 2008-01-01 10:29:36 -08:00
Mathias Gumz
04cd2fd14c removed some unneeded headers 2007-12-30 16:32:53 +01:00
markt
474e201745 only allow one open menu at a time 2007-12-11 19:29:00 +00:00
markt
5d7043320d allow arbitrary window patterns in iconbar 2007-11-12 21:59:43 +00:00
markt
c6a2605d76 replaced ModKey with new key commands StartMoving and StartResizing 2007-10-22 17:45:39 +00:00
markt
a59428d67a merged changes from pre-devel 2007-10-13 21:51:37 +00:00
markt
363764db5b fix ToggleDecor for fullscreen and decorationless windows, plus some other cleanup 2007-07-24 12:12:45 +00:00
markt
135019abf9 fixes for --program-prefix and --program-suffix, plus fixed overwriting init file on reconfigure 2007-07-07 23:11:04 +00:00
markt
4c1a242968 moved some code around (regarding event handling) in preparation for upcoming features 2007-03-04 17:47:37 +00:00
markt
9477af82a5 removed session.numLayers resource, as it was useless and caused segfaults 2007-03-03 23:27:16 +00:00
markt
8930a711ee only grab keybindings on screens managed by fluxbox 2007-01-05 16:54:34 +00:00
markt
d6a3af53ff don't run [startup] items if fluxbox fails to load 2007-01-01 01:44:35 +00:00
markt
9229f8bc9c don't revert focus away from command dialogs 2006-07-25 21:54:58 +00:00
markt
be2f40a10d use a timer to make sure focus always reverts if possible 2006-07-23 09:51:54 +00:00
markt
85b2664d78 dead resource 2006-07-22 08:42:56 +00:00
markt
6cd9ad46cc some dead resources and the functions that go with them 2006-07-04 01:01:44 +00:00
markt
c18985732b more dead functions 2006-07-01 03:32:53 +00:00
markt
698539d9b9 more dead functions 2006-07-01 02:56:46 +00:00
markt
a14c322dcb more dead functions 2006-06-30 15:59:30 +00:00
markt
301665024d another dead function 2006-06-30 00:19:40 +00:00
mathias
dedbd7e468 Added patch from Jim Ramsay (i dot am at jimramsay dot com) to freely
define the used modkey.

Added new action SetModKey too
2006-06-22 07:46:12 +00:00
fluxgen
85f45be727 added support for _NET_WM_WINDOW_TYPE_DIALOG and _NET_FRAME_EXTENTS 2006-06-18 21:23:24 +00:00