Commit Graph

3561 Commits

Author SHA1 Message Date
Kim Woelders 726bb9ea13 FX: Fix clipping with compositing enabled 2021-05-07 07:12:11 +02:00
Kim Woelders 8170ada68c FX: Make it work in regular compositing mode 2021-05-07 07:11:32 +02:00
Kim Woelders 47d1aa9d19 FX: Tweaks 2021-05-07 07:11:32 +02:00
Kim Woelders b89785d923 FX: Some refactoring
No functional changes, preparing for other stuff.
2021-05-07 07:11:32 +02:00
Kim Woelders f770f9d223 FX: Fix waves cleanup 2021-05-07 07:11:32 +02:00
Kim Woelders bbec00eb12 FX: Remove "correct bugs" operation in waves
Not sure what was intended. The operation specifies a source area
outside the pixmap.
2021-05-07 07:11:32 +02:00
Kim Woelders f18f394e35 Introduce HAVE_COMPOSITE_OVERLAY_WINDOW 2021-05-07 07:11:09 +02:00
Kim Woelders 6b1668d60b glwin.c: Fix incorrect config item size 2021-04-26 17:23:35 +02:00
Kim Woelders fc34a157b9 Sound: Enable changing engine at runtime
Mostly for fun but also makes it easier to compile check/test all sound
engines in one e16 instance, instead of having to go through all
build-time sound configurations.
2021-04-23 19:54:52 +02:00
Kim Woelders 4df26af47a Don't build disabled stuff
Disable by autofoo instead of by #ifdef.
2021-04-23 08:21:41 +02:00
Kim Woelders 06a6894e90 Sound: Change some esd to esound
Preparing for sound engines.
2021-04-23 08:21:41 +02:00
Kim Woelders 9b11a3d2a1 Sound: Change some pa to pulse
Just a bit more consistent.
2021-04-23 08:21:41 +02:00
Kim Woelders 4598a70547 Sound: Header file tweaks
Generally use config.h instead of E.h.
2021-04-23 08:21:41 +02:00
Kim Woelders 93b8da7e8a Move Eexec() and friends to util.h
Seems more appropriate.

And add missing __PRINTF__ on Espawn() prototype.
2021-04-23 08:21:41 +02:00
Kim Woelders 50e6b76395 Drop (v)snprintf() implementation
Let's assume everybody has this by now.
2021-04-23 08:21:41 +02:00
Kim Woelders 404886956b Eliminate AM_LANGINFO_CODESET 2021-04-12 19:37:24 +02:00
Kim Woelders dd2c51ec75 Focus: Tweak request serial number check logic - correction 2021-04-01 20:43:16 +02:00
Kim Woelders 55872b9db1 Focus: Fixup after "Fix pointer focus on new windows..."
Only do desk switch when focusing new transient.
2021-04-01 20:43:01 +02:00
Kim Woelders 53e15851c9 Focus: Improve debug message understandability 2021-04-01 20:38:40 +02:00
Kim Woelders 71d8448cea Fix pager update on desk switch
With composite enabled and doing pager snapshot/scan (not "live") the
screen must be repainted after desk switch before snapshotting.
2021-03-20 19:09:00 +01:00
Kim Woelders f188d84406 Fix segv on bad border definition
If a border definition was completely empty we would call _BorderCheck()
with b = NULL.
2021-03-20 06:58:32 +01:00
Kim Woelders 358b60baf9 Introduce E_ARRAY_SIZE() and MOD_ITEMS()
Just a bit tidier.
2021-03-19 06:36:46 +01:00
Kim Woelders 136f37f0b9 Focus: Tweak request serial number check logic
Too many Enter events were ignored.
2021-03-16 20:16:05 +01:00
Kim Woelders 01f17e409e Focus: Don't set focus on sliding windows
Focus should be updated when sliding is done.

Probably not much of a problem but seems right.
2021-03-16 20:16:05 +01:00
Kim Woelders ebe82a7bbb Focus: Fix pointer focus on new windows if pointer is in window
In certain situations new windows would not be focused.
2021-03-16 20:16:05 +01:00
Kim Woelders 09627036c0 Allow Winop border in matches.cfg
There should be no particular reason not to.

Also issue warning about reference to non-existing border.
2021-03-10 19:06:22 +01:00
Kim Woelders 7872361105 Remove unused Pager:name 2021-03-08 18:55:48 +01:00
Kim Woelders 84baa86492 Fix pager live updates if millisecond time is initially "negative" 2021-03-08 18:49:24 +01:00
Kim Woelders 9d678fc554 Fix handling of imageclasses with flipped/rotated images
Each modified image needs its own file to avoid getting in trouble with
pixmap caching.

The trouble in question was only seen if misc.memory_paranoia was set
to 0 (is 1 by default).
2021-03-06 21:02:10 +01:00
Kim Woelders 0987540d5e Fix pager zoom window sometimes flickering at 0,0 2021-03-03 19:35:27 +01:00
Kim Woelders 94b810cc37 Add EoGetParent() etc. 2021-03-03 19:34:53 +01:00
Kim Woelders dc6e1f5508 group_op showhide should target all the windows groups members 2021-02-27 20:33:14 +01:00
Kim Woelders 932af2b256 Rename EDirUser{Set} wrappers and use then some more 2021-02-19 19:58:23 +01:00
Andrew Savchenko 0a4f1b14ed Support user fonts
Allow users to override fonts via ~/.e16/fonts/

Signed-off-by: Andrew Savchenko <bircoph@gmail.com>
2021-01-19 17:42:04 +01:00
Kim Woelders eb4ea872e9 Sound: Treat player engine like others 2021-01-09 16:08:24 +01:00
Kim Woelders ec03e3cdb5 Sound: sound_pa -> sound_pulse 2021-01-09 16:08:09 +01:00
Kim Woelders b69ced9eba Sound: Mostly cosmetic changes 2021-01-09 13:43:27 +01:00
Kim Woelders 3c75173573 Sound: autofoo cosmetics 2021-01-09 13:43:27 +01:00
Kim Woelders f3de71d05f Consistently put __EXPORT__ in .c files 2021-01-09 09:50:04 +01:00
Kim Woelders 99c7523b07 Forgot some 2020 2020-12-29 16:23:17 +01:00
Kim Woelders cf071d3a08 conf.h: Remove some unused items 2020-12-18 16:33:38 +01:00
Kim Woelders f625824349 Configuration parsing cleanups
Drop some CONFIG_VERSION cases that shouldn't be needed.
2020-12-18 15:08:09 +01:00
Kim Woelders 257d8e6117 Include git stamp in version info (if built from git checkout) 2020-12-18 11:27:14 +01:00
Kim Woelders faf6393a8b Introduce EImageDefineCursor() 2020-12-11 17:57:13 +01:00
Kim Woelders 26252064fe Introduce EImageRenderOnDrawableARGB() 2020-12-11 17:57:13 +01:00
Kim Woelders 0c33378819 Cache visual in EVisualFindARGB() 2020-12-11 17:57:13 +01:00
Kim Woelders 02568bb00c Remove obsolete color modifier functions
Unused since the pseudotransparency stuff was removed.
2020-12-11 17:56:55 +01:00
Kim Woelders a620fd47dc Use poll() for event handling by default (if available)
Might be more efficient, mostly just playing around.
2020-11-05 17:08:39 +01:00
Kim Woelders b0a4eaa65a Ensure a couple of initialisations are never skipped
Otherwise we may get segv in window mode.
2020-10-11 10:30:04 +02:00
Kim Woelders 171b282f9f Remove unused SM_CLIENT_ID stuff 2020-10-11 10:30:04 +02:00
Kim Woelders 79879a8119 Fix memory leak after failed execvp() 2020-10-11 10:30:04 +02:00
Kim Woelders 9d235a1ecd Remove some (duplicated?) configuration identifiers that are not in definitions 2020-09-26 17:17:25 +02:00
Kim Woelders e04dc8ff91 conf.h: Remove some long obsolete configuration item defines 2020-09-26 17:17:19 +02:00
Kim Woelders bf1095d107 Hide Border struct internals 2020-09-25 16:00:35 +02:00
Kim Woelders 5132afd313 Simplify checks for borderless 2020-09-25 16:00:35 +02:00
Kim Woelders 2dad8c5f29 Use border name wrapper function some more 2020-09-25 16:00:35 +02:00
Kim Woelders 00f4a27d93 borders.c: Prefix static functions with _ 2020-09-25 16:00:35 +02:00
Kim Woelders 1dc44176d4 ipc.c: Trivial cleanups 2020-09-25 16:00:35 +02:00
Kim Woelders d46d0aec05 CM: Fix damage corner case (reparenting fading-out window) 2020-09-09 16:23:05 +02:00
Kim Woelders 7199436ec5 CM: Fix switching fadeout to fadein
Happens when mousing over pager with zoom enabled.
2020-09-09 16:23:05 +02:00
Kim Woelders 84372a1165 hiwin: Tweak debug 2020-09-09 16:23:05 +02:00
Kim Woelders 02f0afd97b Merge variables controlling click-to-raise configuration 2020-06-29 19:47:36 +02:00
Kim Woelders 79711672ab focus.c: Eliminate unnecessary variable 2020-06-27 19:48:16 +02:00
Kim Woelders e6b62914b4 Make "only primary mouse button raises" option take effect immediately 2020-06-23 21:11:13 +02:00
Kim Woelders 0a6b8e177c Add option to allow only the primary mouse button to raise windows
Patch by Simon Kesenci
2020-06-23 21:11:10 +02:00
Pierre Neyron b21e0cd093 Document the "absolute" parameter for the toggle_* window operations 2020-06-08 20:10:08 +02:00
Kim Woelders aae5938e97 Fix technical/shapewin move mode with window groups
The technical etc. move modes using a shaped window ("avoid server grab"
mode) only properly shaped the shape window of the first group member.

Broken since 0c16916258 - v1.0.12.

This commit changed the mode of operation from one shape window in total
to one per group member, i.e. shapes should no longer be combined.

..and drop useless fl variable in _MoveResizeMoveResume().
2020-05-06 15:28:53 +02:00
Kim Woelders b27ff7ee74 Fix technical/shapewin move mode through edge flip
The technical etc. move modes using a shaped window ("avoid server grab"
mode) would create a new shape window on every edge flip, which could
only be removed by restarting e16.

Broken since 0c16916258 - v1.0.12.
2020-05-06 15:12:40 +02:00
Kim Woelders db38aae9e6 groups.c: Fold "groups" into "group_op" IPC command 2020-05-05 22:42:08 +02:00
Kim Woelders f0029d9f63 groups.c: Add group list ipc comand 2020-05-05 22:42:08 +02:00
Kim Woelders f58ca9c26a groups.c: Eliminate _EwinInGroup() 2020-05-05 22:42:08 +02:00
Kim Woelders f5324ebd5a groups.c: Simplify _GroupDelete() some more 2020-05-05 22:42:08 +02:00
Kim Woelders d511dd782c groups: Rework group configuration saving
- No longer just store groups that are referenced by snaps
  Makes to logic somewhat simpler.
- Only and always write group configuration when changed
  Previously we updated the group configuration way too often (on any
  snap change).
2020-05-05 22:42:08 +02:00
Kim Woelders b65a31e3d4 snaps: Fix snapshot group remembering when all groups are deleted
When all groups were deleted from a window it would stop remembering
group membership.

Unfortunately this fix is not backwards compatible.
If downgrading setups where some windows have multiple groups some group
memberships will be lost.
2020-05-05 22:42:08 +02:00
Kim Woelders c2e9649cd5 groups.c: Fix snapshot updating 2020-05-05 22:42:08 +02:00
Kim Woelders 9c18d93735 groups.c: Add some debug 2020-05-05 22:42:08 +02:00
Kim Woelders 0df0320da6 groups.c: Fix group deletion
The loop construct did not delete all groups.

Do group destruction after loop to avoid accessing deleted
group->num_members.
2020-05-05 22:42:08 +02:00
Kim Woelders 924518956c groups.c: Add group del command 2020-05-05 22:42:08 +02:00
Kim Woelders 1399c7bf7d groups.c: Fix showing empty group 2020-05-05 22:42:08 +02:00
Kim Woelders d28388ad70 groups.c: Fix handling groups with negative id 2020-05-05 22:42:08 +02:00
Kim Woelders cc7fe7a2fb groups.c: Mostly cosmetic tweaks 2020-05-05 22:42:08 +02:00
Kim Woelders c2be7e7c14 groups.c: _GroupEwinDestroy() -> _GroupDelete()
Drop the possibility to delete all groups to which an EWin belongs.
It wasn't possible to go down that path anyway.
2020-05-05 22:42:08 +02:00
Kim Woelders d80bf8305c groups.c: Enable popping up ewin group configuration dialogs from ipc 2020-05-05 22:42:08 +02:00
Kim Woelders 3c5f33648e groups.c: Fold "group_info" into "group" IPC command 2020-05-05 22:42:08 +02:00
Kim Woelders 32f4255270 groups.c: Refactor _GroupEwinRemove() 2020-05-05 22:42:08 +02:00
Kim Woelders 4e97cbb637 groups.c: Rename functions for more consistency
Swap a couple of arguments too.
No functional changes.
2020-05-05 22:42:08 +02:00
Kim Woelders c4026c585c groups.c: Reshuffle code to avoid forward declarations 2020-05-05 22:42:08 +02:00
Kim Woelders 02001e632d groups.c: Mostly cosmetic changes around group configuration 2020-05-05 22:42:08 +02:00
Kim Woelders 5a131b00b1 groups.c: Eliminate BuildWindowGroup() 2020-05-05 22:42:08 +02:00
Kim Woelders 864009da54 groups: Eliminate EwinGetGroups()
Not particularly useful.
2020-05-05 22:42:08 +02:00
Kim Woelders 01a2163989 Add feature to build with ASAN (--enable-gcc-asan) 2020-05-05 22:42:08 +02:00
Kim Woelders be8c4faf60 Add alsa-lib sound backend 2020-05-05 10:22:36 +02:00
Kim Woelders 47d9555861 Minor cleanups in sound players
The sample pointers will never be NULL in _Play() and _Destroy() so drop
checks.

Also drop some pointless pointer clearing.
2020-05-05 10:15:44 +02:00
Kim Woelders 26e106a613 Avoid potential crash when attempting to enable sound, cosmetics
IF sound initialization fails AND then attempting to enabling sound with
"eesh set sound.enable 1" (which didn't actually enable sound), e16
could crash.
2020-05-02 11:11:10 +02:00
Kim Woelders d24cdd303b GSOD: Avoid rendering artifacts when unmapped
Somewhat hacky as the compositor may discard window events if the window
destroy event is received in the same batch as the map(reparent) event,
hence the delay before destroy.
2020-05-02 09:56:04 +02:00
Kim Woelders 42447b16d3 Minor cleanups after sound by audio player feature
- Correct configure.ac help string
- Issue warning if player is not executable

Also change sound server problem warning message from GSOD to dialog.
2020-05-02 08:12:46 +02:00
Kim Woelders 9a6825fadf Introduce path_canexec0() for convenience 2020-05-02 08:11:30 +02:00
Kim Woelders 1ea08c2075 Optionally play sounds using audio player 2020-05-01 15:42:03 +02:00
Kim Woelders 0ef79b8771 Autofoo sound configuration cosmetics 2020-05-01 14:11:26 +02:00
Kim Woelders cf552ef7f9 Enable sounds in combined configuration dialog 2020-05-01 14:11:26 +02:00
Kim Woelders 8b10610095 Espawn(): Use variable argument list 2020-05-01 14:11:26 +02:00
Kim Woelders cee07a720a groups.c: Correct debug stuff 2020-03-07 17:30:56 +01:00
Kim Woelders 7011dc150d Hide Group struct internals 2020-03-07 17:30:56 +01:00
Kim Woelders c839d0e14a src: Fix clang-analyzer complaints
arrange.c: Highly unlikely, maybe impossible situations

backgrounds.c: False positive (I think)

dialog.c: Fix memleak/segv on realloc failure

focus.c: False positive
	ewin should never be NULL with FOCUS_EWIN_NEW

main.c: False positive
	eoptarg will always be set if argument requires option

menus.c: Fix memleak on malloc failure

session.c: Fix dead assignment

stacking.c: False positive
	Changed code is nicer though

pager.c: False positive
	ewin would never be NULL if hiwin was NULL
	But rearrange for clarity anyway

ecompmgr.c: Avoid bogus issues
2020-01-29 16:43:01 +01:00
Kim Woelders b6f500f3bc aclass.c: Fix valgrind complaint 2020-01-25 14:36:47 +01:00
Kim Woelders 32e9cf4535 slideouts: Fix potential crash
For obscure reasons(?) Mode.context_win may be set to some large window.
If a slideout is then shown (if the slideout doesn't fit between the
window and the screen edge), SlideoutShow() will call itself recursively
until we crash.
2020-01-25 14:32:47 +01:00
Kim Woelders 031b9dd23e slideouts: Refactoring
- Split up SlideoutCalcSize().
- Move the functions to avoid forward declarations.
- Drop pointless call in SlideoutAddButton().
2020-01-25 14:32:47 +01:00
Kim Woelders b294796de2 slideouts: Use defines for directions
And correct the two incorrect ones.
2020-01-25 14:32:47 +01:00
Kim Woelders 88dba1cfff Re-indent with indent-2.2.12 2020-01-23 21:30:02 +01:00
Kim Woelders 18f9df7774 Fix unmaximizing by _NET_WM_STATE[_MAXIMIZED_...] 2020-01-23 20:30:23 +01:00
Kim Woelders 4e74e31d23 bindings: Add 'W' as alias for modifier 4 2020-01-23 20:29:51 +01:00
Kim Woelders d4278e802e windowmatches: Add some consts 2020-01-23 20:29:15 +01:00
Kim Woelders 8f1bfc4f53 Fix warnings occurring in various situations 2020-01-23 20:29:05 +01:00
Kim Woelders 7836d0cf3e windowmatches: Enable having spaces in name matches 2020-01-06 17:22:06 +01:00
Kim Woelders 4df8199d60 windowmatches: Remove some cruft 2019-12-28 10:47:15 +01:00
Kim Woelders e101ec06a7 windowmatches: Issue notice when discarding invalid one 2019-12-25 16:50:37 +01:00
Kim Woelders 36763cc7e2 windowmatches: Resurrect USE_ICON_IMAGE_FOR_CLIENT_() macros 2019-12-25 16:23:35 +01:00
Kim Woelders 4daa634a06 windowmatches: Remove ancient incorrect case values 2019-12-25 14:25:52 +01:00
Kim Woelders 57be6615d3 windowmatches: Fix use of MAKE_WINDOW_STICKY_...() macros
Looks like the last time this worked was in 0.16.8.
2019-12-25 14:25:40 +01:00
Ingo Feinerer 04ec9834d9 Add sndio sound back end 2019-08-14 15:14:45 +02:00
Kim Woelders 7af2a15fef Fix using sound in modular build
Also remove obsolete __EXPORT__s on Strlist.. functions.
2019-08-10 16:32:48 +02:00
Kim Woelders c67ebd88ba Explicitly include sys/select.h where needed
... rather than relying on it to be included via sys/time.h or sys/types.h.
2019-07-30 17:40:04 +02:00
Kim Woelders 3aec52f580 Fix potential warning
Issued by gcc9 with certain combinations(?) of build options.
2019-05-30 18:18:48 +02:00
Kim Woelders 9f84935029 Fix build without composite 2019-05-30 17:38:37 +02:00
Kim Woelders d767409ee8 Make config dialog edge flip mode changes take effect immediately
Previously it required a restart.
2019-05-18 07:08:52 +02:00
Kim Woelders e9c282c773 Forgot some 2019 2019-05-10 06:35:40 +02:00
Kim Woelders fc567497a9 GSOD: Only react to shown buttons 2019-04-25 09:40:34 +02:00
Kim Woelders 84616e4617 GSOD: Better keyboard grab
XGrabKeyboard() may fail if Alert*() is called from a child process
during an activated passive key grab, e.g. due to a keybinding doing
an "exec some-prog", and execl(some-prog) fails.
If XGrabKeyboard() fails the GSOD will not receive key events and only
the pointer can be used to interact with the GSOD.

Therefore we now also grab all possible keys/modifiers which should
normally include the Fn keys we want, and to some degree ensure that
other keyboard input is caught and ignored.
However, it seems that passive key grabs without modifiers may be
activated (queued) and prevent further key events to the GSOD -
presumably not a major problem in practice.
2019-04-25 09:17:21 +02:00
Kim Woelders e05a7293c6 Fix timer havoc in obscure situations
Not exactly sure when, but timers were created with undefined again,
which could lead to trouble due to unintended timer deletion.
2019-04-25 09:06:06 +02:00
Kim Woelders d77444f16d Fix potential memory leak in _ScreenInitXrandr() 2019-04-25 09:06:06 +02:00
Kim Woelders 4d8f151154 Use pkg-config some more 2019-04-25 09:06:06 +02:00
Kim Woelders 5d21c40c92 Fix compositing glitches with tiled backgrounds
It seems that sometimes there are rendering glitches when having a tiled
backround with 0 offsets and tile size less than screen size.

In this case the desktop pixmap would be smaller than the screen size and
we rely on the repeat picture attribute in the desktop picture to get it
tiled over the entire desktop window when compositing.

However, it seems that sometimes(?) the desktop window is not properly
repainted outside the top left tile.

To fix this we now always use a full-sized background pixmap when
compositing is enabled.

I think this is an X-server bug but I haven't been able to produce a
test case demonstrating the problem.
2019-04-06 11:10:27 +02:00
Kim Woelders 8ff53d9575 Remove unused header 2019-04-06 11:10:27 +02:00
Kim Woelders 9e476fb426 Fix potential segv in pulseaudio sound handler 2019-04-06 11:10:27 +02:00
Kim Woelders 8994417b49 Fix memory leak in pulseaudio sound loader
The leak only happens when a sound file is first loaded so the leakage
will not grow indefinitely.

Also eliminate global sample_stream and sample_length.
2019-04-06 11:10:27 +02:00
Kim Woelders e1a6416a04 Restore background to last set if quitting background selector 2019-04-02 18:28:08 +02:00
Kim Woelders cd99117378 Correct refresh when switching away from background "None" 2019-04-02 18:28:08 +02:00
Kim Woelders 87d4ea9f48 Don't do double-clicks on scroll wheel events 2019-03-31 20:21:50 +02:00
Kim Woelders 83d1002949 Tweak winop opacity delta mode
- If current opacity property value is 0 meaning default then use
  actual current opacity.
- Don't go below 10%
- Going above 100 means use default (value = 0)
2019-03-31 20:21:50 +02:00
Kim Woelders c9ad641ba8 Fix restart after choosing Restart in GSOD on e.g. segv
Mode.wm.exit_now should be set before calling SessionExit() which may
happen inside Alert().
2019-03-26 18:47:45 +01:00
Kim Woelders d3f92db637 Remove saveunders option from Miscellaneous Settings dialog
No longer generally useful.

The option is still available via the misc.save_under configuration
parameter.
2019-03-26 18:45:53 +01:00
Kim Woelders 759f3743bd Correct (disabled) debug printout 2019-03-20 20:35:19 +01:00
Kim Woelders 802f34f758 Introduxe ArrangeEwinCenteredOn() 2019-03-05 16:15:28 +01:00
Kim Woelders c23bca5c26 Split unplaced transient and dialog handling
Shouldn't make much difference but makes the code a bit easier to
follow.
2019-03-05 16:15:28 +01:00
Kim Woelders 524540f7a8 Fix transient placement involving desk/area change (take 2)
Do desk/area change before placing the window.

Otherwise desk/area slides get mixed up with window slide-ins.

Also add some comments about what goes on here.
2019-03-05 16:15:28 +01:00
Kim Woelders 6dab84f6c6 Introduce EwinFindGroupMember() 2019-03-05 16:15:28 +01:00
Kim Woelders 84788b993c Optionally don't slide in DeskGotoByEwin()
No actual changes yet.
2019-03-05 16:15:28 +01:00
Kim Woelders 8dcb2d3dfa Revert "Fix transient placement involving desk/area change"
Does not work properly.

This reverts commit e132f27043.
2019-03-05 16:15:28 +01:00
Kim Woelders 96b538a6e1 Warning fix for gcc 9 2019-02-10 06:08:30 +01:00
Kim Woelders 19e250321f Tweak glwin commands
- Change R to S(top)
- Add R(eset), resetting the absolute rotations too
2019-02-10 06:08:30 +01:00