Andrea Bolognani [Mon, 11 Jul 2016 22:18:50 +0000 (00:18 +0200)]
Include the top level header of each xcb module used
One xcb module, one header file: <xcb/xcb.h> should to be
included directly, instead of relying on other modules dragging
it in; on the other hand, it's okay to include just the top
level <xcb/xcb_util.h> instead of the three separate sub-headers.
[rk@rejii.com: skip xcb_util.h since it breaks xcb-util < 0.3.8]
closes #142
Andrea Bolognani [Sun, 31 Jul 2016 16:56:27 +0000 (18:56 +0200)]
linux: Enable PIE
PIE (position-independent executables) is a security feature
that has been made reasonably cheap by recent improvements in
GCC; as a result, more and more Linux distributions are pushing
for its adoption.
Unfortunately, PIE and PIC are not compatible, so we have to
manage the CFLAGS and LDFLAGS used to compile the library and
the executable indipendently.
Andrea Bolognani [Sun, 31 Jul 2016 16:51:36 +0000 (18:51 +0200)]
linux: Use -fPIC instead of -fpic
According to GCC's documentation, -fpic can have compatibility
issues on some platforms. Use -fPIC instead, which generates
slightly bigger objects but is generally more likely to work.
Get rid of -DPIC, since the symbol is not used anywhere.
Andrea Bolognani [Tue, 5 Jul 2016 11:46:35 +0000 (13:46 +0200)]
linux: Use --as-needed when linking
Using this flag will cause the linker to ignore any libraries
that have been listed on the command line but whose symbols are
not actually used.
Right now, it just gets rid of the unnecessary linking against
xcb-render (see https://bugs.debian.org/829709), but it might
catch missing dependencies in the future, and it will generally
keep the resulting binaries nice and tidy.
Ubuntu and Arch are both using --as-needed by default already,
and other distributions will probably switch at some point.
Andrea Bolognani [Sun, 3 Jul 2016 17:28:42 +0000 (19:28 +0200)]
linux: Split off dependencies' CPPFLAGS
Use MAINT_CPPFLAGS only for stuff used directly by spectrwm, and
move all the stuff needed by dependencies to the newly-defined
BIN_CPPFLAGS and LIB_CPPFLAGS.
Andrea Bolognani [Sat, 2 Jul 2016 10:05:09 +0000 (12:05 +0200)]
linux: Reduce linking for libswmhack
The libswmhack library uses dlopen() and friends, so it needs
to link against libdl; on the other hand, it doesn't use nearly
as many library as spectrwm itself, so linking against them is
pointless.
Split MAINT_LDLIBS into BIN_LDLIBS and LIB_LDLIBS, and use them
for spectrwm and libswmhack respectively.
Reginald Kennedy [Wed, 23 Mar 2016 01:46:40 +0000 (09:46 +0800)]
Upgrade to window reparenting.
Change X11 window borders to drawn frames.
Add support for _NET_REQUEST_FRAME_EXTENTS.
Disable java_workaround.
We no longer need to spoof the LG3D non-reparenting window manager.
A dummy option is still present to prevent a startup exception.
Remove the use of BORDER() since it is no longer needed.
Fix move_ on tiled.
Add new debug_toggle bind for SWM_DEBUG.
Fix managing of mapped 'withdrawn' windows.
Wait for all x11 events to finish processing on shutdown_cleanup.
Reginald Kennedy [Fri, 13 Mar 2015 14:09:27 +0000 (22:09 +0800)]
Improve the bind[] option to accept pointer buttons.
Buttons are specified as Button<n> (case sensitive) where n is 1 to 255.
Example:
bind[move] = MOD+Button8
Existing pointer actions are now available for bind[]:
focus - Focus window/region under pointer.
move - Move window with pointer while binding is pressed.
resize - Resize window with pointer while binding is pressed.
resize_centered - Same as resize but keep window centered.
Reginald Kennedy [Wed, 15 Oct 2014 11:38:45 +0000 (19:38 +0800)]
Add new option: warp_focus
Focus on the target window/workspace/region when clamped.
For example, when attempting to switch to a workspace that is mapped on
another region and workspace_clamp is enabled, focus on the region with
the target workspace. Enable by setting to 1.
Rename visible_noswap to workspace_clamp and update man page:
Prevents workspaces from being swapped when attempting to switch to a
workspace that is mapped to another region. Use warp_focus if you want
to focus on the region containing the workspace and warp_pointer if you
want to also send the pointer. Enable by setting to 1.
Jonathan Armani [Tue, 7 Oct 2014 16:32:38 +0000 (18:32 +0200)]
Add a new visible_noswap option that allow to not swap two visible workspace
This is useful in multi monitor setup, if you have workspace 1 on left
and workspace 2 on right monitor, trying to switch from 1 to 2 on left
region now does nothing.
This option can be enabled in combination with warp_pointer to send the
mouse pointer on the non-swapped workspace.
Campbell Barton [Sun, 30 Nov 2014 16:55:49 +0000 (17:55 +0100)]
Mouse button mapping config option, by levaidaniel
With modification not to enforce correct buttons when applying configuration.
Instead warn if an invalid configuration is set after loading the configuration.