Commit Graph

193 Commits

Author SHA1 Message Date
Kim Woelders 6c1fbaaedd Fix some clang-analyzer complaints 2022-09-22 07:35:30 +02:00
Kim Woelders 8878d862fd background: Discard broken backgrounds when opening configuration dialog 2022-05-13 15:35:10 +02:00
Kim Woelders 546c1bb2df dialogs: Text cleanups
In general only capitalize first word.
Capitalization of words was somewhat inconsistent throughout the
dialogs.
2022-04-24 12:41:25 +02:00
Kim Woelders 3c42724f96 Dialog layout adjustments
In general left-align text labels.
2022-04-22 07:41:58 +02:00
Kim Woelders d92bc5a90a backgrounds: Drop 'use_bg' IPC command (but not entirely)
Use "bg use ..." instead of "use_bg ..."

It looks like there are users out there (epplets, feh), so for
compatibility handle it in the ipc compat department.
2022-03-11 06:41:28 +01:00
Kim Woelders dffa629b47 backgrounds: Drop most calls to autosave()
autosave() saves config and snapshot stuff but not the background
configuration.
2022-03-10 21:18:02 +01:00
Kim Woelders f9b5e2883a Eliminate EGetGeometry() 2021-08-14 16:55:26 +02:00
Kim Woelders e98ef5eac2 Backgrounds: Fix trouble when deleting multiply referenced background
If a background to be deleted is multiply referenced it will not be
deleted.
In this case do not adjust the background miniature display.
2021-07-17 17:35:18 +02:00
Kim Woelders 6c0eb8620a Backgrounds: Fix bad list operation in CB_ConfigureDelBG()
If ever we would delete the last background in the list we would get a
segv.
However, this will never occur as the None background is always the last
in the list and we will never delete it.

This can be a bit difficult to comprehend for static analysis tools so
eliminate the offending list operation.
2021-07-17 15:20:53 +02: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 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