Commit Graph

184 Commits

Author SHA1 Message Date
Kim Woelders 358b60baf9 Introduce E_ARRAY_SIZE() and MOD_ITEMS()
Just a bit tidier.
2021-03-19 06:36:46 +01:00
Kim Woelders 9d235a1ecd Remove some (duplicated?) configuration identifiers that are not in definitions 2020-09-26 17:17:25 +02: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 88dba1cfff Re-indent with indent-2.2.12 2020-01-23 21:30:02 +01: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 e1a6416a04 Restore background to last set if quitting background selector 2019-04-02 18:28:08 +02:00
Kim Woelders 22b5e58dcd Refactor/rename/use _EFREE type macros 2018-12-22 11:44:22 +01:00
Kim Woelders 988ebc96e8 Trivial cleanups 2018-03-11 19:51:32 +01:00
Kim Woelders 0d97ea5285 Remove pseudotransparency support - 2
- Transparency...() macros
2018-02-04 13:28:54 +01:00
Kim Woelders 7d11396d3e Fix crash when using mouse wheel in background selector (T2222). 2015-03-23 19:32:49 +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 23872b2cac Simplify dialog data handling. 2014-04-29 19:42:15 +02:00
Kim Woelders 5fc86cc6ad Refactor dialog apply/exit handling.
Split into separate functions so we don't have to check on val all over
to figure out if it is one or the other.

This also avoids that the apply stuff may be done twice on exit a couple
of places.
2014-04-29 19:42:15 +02:00
Kim Woelders 7729a91424 Fix glitch in "Refactor background dialog data handling". 2014-04-29 19:42:04 +02:00
Kim Woelders 5656a9d806 Refactor background dialog data handling. 2014-04-26 10:14:06 +02:00
Kim Woelders 4d1bde02ae Wrap XID and some other X types.
Mostly to change longs to ints to reduce memory footprint a bit on 64
bit systems.
2014-04-23 19:13:00 +02:00
Kim Woelders d1f00956aa Remove ancient unused code. 2014-04-23 07:35:07 +02:00
Kim Woelders b3d41f5229 Fix potential use of freed pixmap. 2014-04-21 11:28:38 +02:00
Kim Woelders a14e2978d8 Wrap some calls to XFillRectangle. 2013-12-29 08:59:39 +01:00
Kim Woelders e1f062fff5 Use NoXID in stead of None. 2013-12-29 08:59:38 +01:00
Kim Woelders e287b37e78 Switch to new list implementation.
Faster, less code, less memory usage.
Not that it matters much - mostly for fun.
2013-08-09 11:43:48 +02:00
Kim Woelders 4858f55da9 Fix background dialog issues.
Various properties weren't properly updated when selecting a different
background.
2013-07-11 22:40:39 +02:00
Kim Woelders a0034a6f70 Discard broken backgrounds (bg file missing) on exit. 2013-07-11 17:50:39 +02:00
Kim Woelders 18b47b5d8a Disable moving "None" background to front.
Also some cosmetics.
2013-07-11 17:50:38 +02:00
Kim Woelders 307d86f555 Cosmetics - paving the way for other changes. 2013-06-14 19:47:07 +02:00
Kim Woelders 1d2dd98f98 Eliminate Quicksort(), use libc qsort() in stead.
Might as well use libc function - saves some bytes of code.
2013-03-26 22:24:39 +01:00
Kim Woelders 7fd4f7a71d Cosmetics.
SVN revision: 78407
2012-10-24 17:20:38 +00:00
Kim Woelders af5dcb3987 Change some longs to ints where long is not needed.
SVN revision: 66973
2012-01-08 12:54:08 +00:00
Kim Woelders 4ceb809f74 Minor debug printout cleanups.
SVN revision: 60483
2011-06-19 14:36:47 +00:00
Kim Woelders 89d43e4f1b Move variable into scope where it is used.
SVN revision: 59968
2011-06-05 14:53:52 +00:00
Kim Woelders a15f23b71d Fix solid color backgrounds.
SVN revision: 59311
2011-05-10 15:43:37 +00:00
Kim Woelders 1a27875781 Fix having background file names with spaces (Daniel Manjarres).
SVN revision: 59310
2011-05-10 15:43:34 +00:00
Kim Woelders d4dfea8125 Enable having background files with whitespace in name.
Suggested by Daniel Manjarres.

In order to avoid compatibility issues with older e16 versions
the backgrounds file is renamed from e_config-<something>.backgrounds to
e_config-<something>.bg.

SVN revision: 59082
2011-05-01 10:52:05 +00:00
Kim Woelders 3d8e1d431c Show backgrounds in settings dialogs with same aspect ratio as screen.
Make the background images (also used in background selection menu)
screen size/12, which normally will be somewhat larger than the old 64x48.

Based on patches by Daniel Manjarres.

SVN revision: 59080
2011-05-01 10:51:59 +00:00
Kim Woelders f0c0a4519c Change TimerAdd() and TimerSetInterval() time to ms.
SVN revision: 55891
2011-01-05 18:05:57 +00:00
Kim Woelders 674ae16616 Add const to Quicksort compare function prototype.
SVN revision: 55273
2010-12-05 05:38:39 +00:00
Kim Woelders 5a98c9373e Indent.
SVN revision: 51725
2010-08-29 13:45:57 +00:00
Sebastian Dransfeld 652510db74 Check y component too
SVN revision: 51722
2010-08-29 10:59:26 +00:00
Lucas De Marchi ed721d79ca Apply double_condition_check.cocci
The offending projects were:

 E16/e/src/backgrounds.c                 |   10 ++++------
 PROTO/eon/src/lib/layout/eon_stack.c    |    4 +---
 ecore/src/lib/ecore_win32/ecore_win32.c |    3 +--
 ecore/src/lib/ecore_wince/ecore_wince.c |    3 +--
 edje/src/lib/edje_edit.c                |    3 +--
 evas/src/lib/cache/evas_cache_image.c   |    2 +-
 exalt/src/lib/libexalt_private.c        |    2 +-


This patch assumes code in these places were insane and the fix is to remove
one condition check. Most likely this is not true, but there's no automatic fix
for that.

Looking at the patch, it seems that some places should use "x" and "y" vars but
used just one of them and therefore they were caught by coccinelle.




SVN revision: 51666
2010-08-26 20:45:09 +00:00
Kim Woelders 7aab9bea4b Indent.
SVN revision: 51490
2010-08-21 14:39:55 +00:00
Lucas De Marchi f287759d3e Convert (hopefully) all comparisons to NULL
Apply badzero.cocci, badnull.coci and badnull2.cocci

This should convert all cases where there's a comparison to NULL to simpler
forms. This patch applies the following transformations:

code before patch               ||code after patch
===============================================================

return a == NULL;                 return !a;

return a != NULL;                 return !!a;

func(a == NULL);                  func(!a);

func(a != NULL);                  func(!!a);

b = a == NULL;                    b = !a;

b = a != NULL;                    b = !!a;

b = a == NULL ? c : d;            b = !a ? c : d;

b = a != NULL ? c : d;            b = a ? c : d;


other cases:

a == NULL                         !a
a != NULL                         a




SVN revision: 51487
2010-08-21 13:52:25 +00:00
Kim Woelders c517a00f0b Indent.
SVN revision: 51100
2010-08-13 21:05:00 +00:00
Lucas De Marchi 4d4401c5d3 Apply badzero.cocci, badnull.cocci and badnull2.cocci
Since badzero.cocci depends on coccinelle knowledge about a variable being a pointer
and about a function returning a pointer, maybe there are false negatives.



SVN revision: 51092
2010-08-13 17:04:13 +00:00
Kim Woelders 4ac03926da Adjustments for indent 2.2.11.
SVN revision: 50909
2010-08-08 19:03:34 +00:00
Lucas De Marchi 118b441611 Remove unneeded code with notnull.cocci script
The notnull.cocci script from Coccinelle finds places where you check if a
variable is NULL, but it's known not to be NULL. The check can be safely
removed. For example, this code would be caught by notnull:

if (!var) return;
if (var && var->fld) { ... }

It's needless to check again if var is not NULL because if it's in fact NULL,
it would have returned on the previous "if". This commit removes all the
trivial places where this pattern happens. Another patch will be generated for
the more complex cases.


SVN revision: 50241
2010-07-14 02:05:47 +00:00
Kim Woelders 0466673fbf Trim whitespace from translatable strings.
SVN revision: 48723
2010-05-09 19:03:19 +00:00
Kim Woelders 490dff5974 Remove some trailing spaces from bg show command output.
SVN revision: 48722
2010-05-09 19:03:16 +00:00
Kim Woelders 203247f8a2 Silence clang.
SVN revision: 48559
2010-05-02 20:26:47 +00:00
Kim Woelders 29a5b4489d Centralise file loading, based on file type.
Change install paths:
- menus: <datadir>/config/menus -> <datadir>/menus
- icons: <datadir>/config/pix   -> <datadir>/icons
- pix:   <datadir>/config/pix   -> <datadir>/pix

SVN revision: 47695
2010-04-02 15:27:58 +00:00
Kim Woelders d5175a9574 Change some functions to macros, simplify setup stuff.
SVN revision: 46932
2010-03-07 07:05:18 +00:00