Commit Graph

3561 Commits

Author SHA1 Message Date
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
Kim Woelders 077c50513d Forgot indent 2019-02-10 06:07:38 +01:00
Kim Woelders e132f27043 Fix transient placement involving desk/area change 2019-01-02 17:34:33 +01:00
Kim Woelders 0c623f1efe Remove pointless goto 2019-01-02 17:34:33 +01:00
Kim Woelders 0e0d840453 Consistently use *ALLOC() macros 2018-12-22 15:45:31 +01:00
Kim Woelders 3226edc567 Change EFREE_... macros to functions
Reduces code size by ~4k.
2018-12-22 11:44:22 +01:00
Kim Woelders b9a9946a0a Update copyright to 2018 2018-12-22 11:44:22 +01:00
Kim Woelders 22b5e58dcd Refactor/rename/use _EFREE type macros 2018-12-22 11:44:22 +01:00
Kim Woelders 0c3b5a0625 Add theme defined menu 2018-12-16 12:00:06 +01:00
Kim Woelders 17f29731f0 Enable changing only theme variant
Use e.g.
$ e16 -t :variant
$ eesh theme use :variant
2018-12-15 20:49:50 +01:00
Kim Woelders 09204d4fdb Indent 2018-12-15 18:43:11 +01:00
Kim Woelders cdccc198cd Avoid unnecesary use of MenuSetTitle() 2018-06-23 14:07:42 +02:00
Kim Woelders b01703314a More warning fixes for gcc 8 2018-04-06 04:35:33 +02:00
Kim Woelders fde462c1ca Warning fixes for gcc 8 2018-03-31 09:09:52 +02:00
Kim Woelders 982ccfe70e Fix focus-if-group-focused cases
In various cases focus would not be set as intended, at least when
not focus-all-new and
 click-to-focus or
 not click-to-focus and pointer not in new client
2018-03-28 18:46:48 +02:00
Kim Woelders 525e7afc6b focus.c: Cosmetics 2018-03-28 18:43:22 +02:00
Kim Woelders 988ebc96e8 Trivial cleanups 2018-03-11 19:51:32 +01:00
Kim Woelders 6e3a325980 xprop.c: Fix warnings found with -O3
If num = 0 realloc() below would use uninitialized lst if op != REMOVE.

However, ex_window_prop_xid_list_change() is currently not used by e16.
2018-03-11 19:47:43 +01:00
Kim Woelders 6d50041570 Minor win_op help update 2018-03-03 14:54:28 +01:00
Kim Woelders 5e836ea001 On window mode exit close/kill windows instead of reparent to root 2018-03-03 14:21:16 +01:00
Kim Woelders 3e5398789b Add some image cache control
Most of this requires imlib2-1.5.0.

- Enable showing setup and usage.
- Store regular image cache size in configuration.
- Add control for XImage cache item count.
2018-02-22 07:36:36 +01:00
Kim Woelders db6a869b42 Restart cursor: Use in window mode too 2018-02-12 21:26:01 +01:00
Kim Woelders 137ba9f116 Restart cursor: Increase timeout + debug tweaks 2018-02-12 21:26:01 +01:00
Kim Woelders 3ab0c509d2 Print messages for problematic borders (if EDEBUG 1) 2018-02-09 18:16:34 +01:00
Kim Woelders 8fcc2be58a Sort IPC help in columns instead of rows 2018-02-09 18:15:47 +01:00
Kim Woelders e689a03da9 A bit of startup/theme debug 2018-02-09 18:14:08 +01:00
Kim Woelders 63169e79d0 Fix theme variant handling
The variant wasn't remembered persistently.

Also change the theme variant delimiter to ':'.
2018-02-04 16:31:25 +01:00
Kim Woelders 92cb89490b Avoid confusing dual use of Mode.theme.path 2018-02-04 16:25:16 +01:00
Kim Woelders cefd067f7d Swap ThemeFind() and ThemePathFind() names
Seems more reasonable.
2018-02-04 16:22:50 +01:00
Kim Woelders 6796b87dff Cosmetics 2018-02-04 16:22:07 +01:00
Kim Woelders 9003da8a0d Remove some cruft 2018-02-04 15:34:57 +01:00
Kim Woelders 1829527170 Tweak theme variant setting
Set "THEME_VARIANT_<variant>=1" instead of "VARIANT=<variant>".
Should be easier to deal with in themes.
2018-02-04 15:34:57 +01:00
Kim Woelders 2f0b4464fc Enable using ImageClass as menu icon
Before 00c261652e the menu item icon
was always an ImageClass name.
After changing this to be a file name some themes defining menus
(e.g. Ganymede with button tweaks) did not work as intended wrt. button
menus.
So now we accept both.
2018-02-04 13:45:15 +01:00
Kim Woelders ca5040e643 Remove pseudotransparency support - 3
- Remove obsolete image type argument.
2018-02-04 13:32:59 +01:00
Kim Woelders 0d97ea5285 Remove pseudotransparency support - 2
- Transparency...() macros
2018-02-04 13:28:54 +01:00
Kim Woelders fda39df73d Remove pseudotransparency support - 1
Has been disabled by default for 5 years.

- Remove autofoo stuff.
- Unifdef ENABLE_TRANSPARENCY and ENABLE_THEME_TRANSPARENCY.
- Remove transparency settings from docs/e16.xml.
2018-02-04 13:27:31 +01:00
Kim Woelders 61a9a99fe6 theme.c: Fix theme file extraction 2018-01-04 19:46:16 +01:00
Kim Woelders 6ce105da14 theme.c: List .theme files too 2018-01-04 19:44:50 +01:00
Kim Woelders f98c2e9879 theme.c: Tweak theme listing 2018-01-04 19:44:47 +01:00
Kim Woelders 58a64b8199 theme.c: Fix warning and simplify 2017-12-30 20:15:59 +01:00
Kim Woelders bb772b8781 config.c: Cosmetics 2017-12-30 19:26:42 +01:00
Kim Woelders cb725db9d4 Handle ".theme files"
A .theme file is really the same as the usual .etheme file (i.e.
a tarball of the theme files, compressed or not), except that .theme
files may contain themes for multiple applications.

The difference in the handling of a .theme file is only the location
where it is extracted.

A normal theme file, say FOO.etheme (or FOO.tar, FOO.tar.gz, FOO.blah),
is (normally) extracted to ~/.e16/themes/FOO/.
e16 now expects the theme files to be located in
~/.e16/themes/FOO/*.cfg or ~/.e16/themes/FOO/e16/*.cfg.

A .theme file, e.g. FOO.theme, is extracted to ~/.themes/FOO/.
e16 now expects the theme files to be located in
~/.themes/FOO/*.cfg or ~/.themes/FOO/e16/*.cfg (the first one
should probably never be used, but it's how it works).

In order to find this new theme path it is added to the default theme
search path.

Suggested by Don Harrop.
2017-12-30 19:03:20 +01:00
Kim Woelders 5ead9362a5 Correct various theme path checks 2017-12-30 18:52:54 +01:00
Kim Woelders dfdcbe273e theme.c: Add debug 2017-12-30 18:52:54 +01:00
Kim Woelders b5ad2a0256 Some refactoring in theme look-up
- Split _ThemeExtract() so it now just handles actual theme file
  extraction.
- No longer require full path name when extracting theme file.
2017-12-30 18:52:10 +01:00
Kim Woelders 11d6bbb3f4 theme.c: Cosmetics
- Rename _ThemeCheckPath() to _ThemeCheckDir() and let it return a
  "boolean".
- Change some 4096 to FILEPATH_LEN_MAX.
2017-12-30 16:41:09 +01:00
Kim Woelders e1bcf7dee4 theme.c: Mark some static functions as such 2017-12-30 16:41:09 +01:00
Kim Woelders cb3a873b97 Drop special handling of DEFAULT theme link.
e16 hasn't installed one since 3a394ad52a
(2004).
2017-12-30 16:41:00 +01:00
Kim Woelders 783e4ec79f Make Esystem() take argumments 2017-12-30 16:40:22 +01:00
Kim Woelders 6c4a143e97 Add (disabled) window/pixmap dump commnd 2017-12-17 06:39:18 +01:00
Kim Woelders e23ddddb9f Fix EDrawableDumpImage()
Same issue as previous commit when grabbing windows.
2017-12-17 06:39:04 +01:00
Kim Woelders b87e99e02e Fix magnifier pixel value display
Apparently, when using XShmGetImage to get an XImage for a window,
the image no longer includes subwindows (like when using
IncludeInferiors in GC).
When using XGetImage the XImage still includes subwindows.

Changing EImageGrabDrawable() to EImageGrabDrawableScaled() means that
we use imlib_create_scaled_image_from_drawable() instead of
imlib_create_image_from_drawable().

imlib_create_scaled_image_from_drawable() is implemented in such a way
that the drawable to be grabbed is always copied to a pixmap first.
2017-12-17 06:38:11 +01:00
Kim Woelders 00c261652e Do proper rendering of transparent icons in menus 2017-12-12 21:13:16 +01:00
Kim Woelders 659a8b0455 Fix issue with initially shaded windows in certain cases.
At least in initially shaded SHADE_RIGHT pagers the client window would
be placed at a non-zero y offset in the container.
Not sure exactly why but this (WestGravity -> NorthWestGravity) fixes it.
The other cases got a similar treatment mostly because it seemed right.
2017-10-28 13:50:30 +02:00
Kim Woelders 305d0ef93c Fix focus after slide-in. 2017-10-28 09:35:19 +02:00
Kim Woelders 22de80465d Tweak some (disabled) focus debug stuff. 2017-10-28 09:35:19 +02:00
Pierre Neyron 4c3f0cbb7a add toggle_size half_X feature
Maximize window to a half of the screen (North, South, East, West)
wop * toggle_size half_N
wop * toggle_size half_S
wop * toggle_size half_E
wop * toggle_size half_W
2017-06-25 13:57:31 +02:00
Kim Woelders 70ee606634 Warning fixes for gcc 7. 2017-02-12 19:09:08 +01:00
Kim Woelders 2d4674e374 Forgot some 2016. 2017-02-12 19:04:02 +01:00
Kim Woelders cafd8672e6 Fix warning with recent pango.
pango_xft_get_context() is deprecated.
2016-11-25 18:40:08 +01:00
Kim Woelders 33991a6bf2 Drop incomplete HAVE_STDARG_H stuff. 2016-11-25 17:44:59 +01:00
Kim Woelders c18c409fdf Window list: Show windows on same head as pointer first. 2016-05-06 20:47:14 +02:00
Kim Woelders 6f225f3c74 Refactorization in WarpFocus(). 2016-05-06 20:47:14 +02:00
Kim Woelders 726b7e53d3 Miscellaneous screen stuff.
- Add ScreenGetCurrent().
- Add ScreenGetHead().
- Make ScreenAdd() private.
2016-05-06 20:47:13 +02:00
Kim Woelders c0d17a2c62 Remove unused Mode.display.xinerama_active. 2016-05-06 20:47:13 +02:00
Kim Woelders 5a87444e63 Use RandR data to populate screens structure.
... and prefer it over Xinerama data.

This should make the Xinerama screen handling stuff work also when
RandR is enabled but Xinerama is not.
2016-04-15 19:24:17 +02:00
Kim Woelders 02e023bb33 Set NorthWestGravity when applying snapshot location.
Otherwise clients with other than NorthWestGravity will not be placed
correctly.
2015-06-22 20:11:58 +02:00
Kim Woelders 08ad426b8b Fix ignoring ConfigureRequest from application.
We would "correct" position/size even though we should ignore the
operation.
2015-06-22 20:10:26 +02:00
Kim Woelders 4c8af1fda8 Require render version 0.11 before using XRenderCreateSolidFill().
Apparently use of XRenderCreateSolidFill() may trigger high Xorg cpu
usage (seen on Xorg 1.7.7 with render 0.10, driver unknown).
Exact reason unknown, maybe a driver problem.

Requiring render version >= 0.11 may just be a random way to avoid
some brokenness in older Xorgs.
2015-06-18 21:00:39 +02:00
Kim Woelders f4b11e47ec Fix stacking when there is only one window.
Thanks to Daniel Nobuto for tracking this one down and reporting it.
2015-05-03 20:37:08 +02:00
Kim Woelders 87ba89d9b4 Fixes for various build corner cases. 2015-04-11 23:19:34 +02:00
Kim Woelders cd095e1637 Eliminate deprecated usleep().
SleepUs() will even sleep the correct amount of time when interrupted by
a signal.
There shouldn't be any significant cases where this could be a problem
though.
2015-04-11 23:19:34 +02:00
Kim Woelders 7d11396d3e Fix crash when using mouse wheel in background selector (T2222). 2015-03-23 19:32:49 +01:00
Kim Woelders 45bf0da80d Slightly different fix to pager zoom/focus issue. 2015-03-23 19:32:48 +01:00
Kim Woelders d23aeb1ca7 Fix focus issues with pager zoom windows on desks other than first (T2197).
Change the zoom window parent to be the current desktop in stead of the
root one.
Otherwise, when entering the zoom window (on desktops other than first),
we get an indication that we are leaving the current desktop causing the
current active window to be unfocused (and refocused when leaving).
2015-03-20 21:07:39 +01:00
Kim Woelders 4b319d794b Wrap some calls to XRenderCreatePicture(). 2015-01-25 00:05:10 +01:00
Kim Woelders 72328b12ab CM: Reorder start/stop details. 2015-01-24 15:50:15 +01:00
Kim Woelders 88e48caf47 CM: Fadeout tweak. 2015-01-24 15:37:56 +01:00
Kim Woelders 345a7a1d7d CM: Cosmetics. 2015-01-24 15:37:56 +01:00
Kim Woelders bf2b7fd300 Fix potential buffer overruns when using sscanf(). 2015-01-23 20:18:20 +01:00
Kim Woelders 1377015985 Forgot a config.h. 2015-01-17 20:06:03 +01:00
Kim Woelders 9c31fe29ed Clean up header file inclusion order.
Fixes building with e.g. -std=c99 and c11 by always including config.h
(which defines _GNU_SOURCE) first.
2015-01-17 19:33:42 +01:00
Kim Woelders e5b71f40f3 Remove unused AnimatorsDelCat(). 2015-01-10 18:56:58 +01:00
Kim Woelders 168ef48fbc Minor fading animation tweak.
Keep fading animator pointer around to avoid having to look it up later.
2015-01-10 18:56:58 +01:00
Kim Woelders 73b7fcc0dd Forgot 2015. 2015-01-10 18:56:58 +01:00
Kim Woelders 8e866cf49c Visibility cosmetics (use EC_C_VISIBILITY). 2015-01-04 16:43:05 +01:00
Kim Woelders ce298f6b42 Fix animator initialisation when duration is 0.
When adding an animator with zero duration the animation would just run
forever.
2015-01-02 14:09:55 +01:00
Kim Woelders 0981a53f1b Fix animation bug.
If animators are added within 1 ms from a call to _AnimatorsTimer()
in a previous event loop run, the animation timer might not be
rescheduled properly.
2015-01-02 11:36:15 +01:00
Kim Woelders 3584d11e80 Minor tweaks in EShapePropagate().
Mostly some more debug.
2015-01-02 11:28:49 +01:00
Kim Woelders f0185a6ab9 Eliminate EwinFindByChildren().
No need for matching container window or border parts.
2015-01-02 10:21:34 +01:00
Kim Woelders f1fd4d8b1d FX: Correct some offsets. 2014-12-20 08:06:51 +01:00
Kim Woelders 420854cb1a FX: Cosmetics. 2014-12-20 08:06:47 +01:00
Kim Woelders 332f592639 Correct shading end size.
Shading animation went a bit too far with end size.
2014-12-16 23:13:56 +01:00
Kim Woelders c3e599ae5e Simplify shading code.
Merge practically identical _EwinShadeRun() and _EwinUnshadeRun().
2014-12-16 23:13:55 +01:00
Kim Woelders 0dbb2e6c88 Autofoo tweaks.
Rename CWARNFLAGS to CFLAGS_WARNINGS for consistency with pending
changes.
2014-12-16 23:11:34 +01:00
Kim Woelders 94714f9b72 Initial CM/Present experimental support.
Seems to work... kindof..
2014-11-23 18:09:28 +01:00
Kim Woelders 1e625f8bb4 Initial Present infrastructure. 2014-11-23 06:37:07 +01:00
Kim Woelders 9c7cf39e31 Prepare to handle other than XI2 generic events. 2014-11-22 16:33:08 +01:00
Kim Woelders 611e6bfed0 Debug printout cleanups. 2014-11-22 16:33:08 +01:00
Kim Woelders f2e2e1bae4 Use XRenderCreateSolidFill() if available. 2014-11-22 16:33:08 +01:00
Kim Woelders 7c6deaabbf Extension version checking cleanups. 2014-11-20 21:45:25 +01:00