Compare commits

...

152 Commits

Author SHA1 Message Date
maxerba 2e54f9851e Updating french translation 2024-05-16 13:50:47 +02:00
Carsten Haitzler 8b06ca97a6 e sys main - fix minor leaking iterator - unused code now 2024-04-23 09:39:56 +01:00
Ross Vandegrift 9c4b442335 attempt to dlopen libddcutil.so.5 first
The backwards-incompatible changes in libddcutil.so.5 are documented at
https://www.ddcutil.com/c_api_200/ - a quick grep says that the only affected
symbol appearing in E is ddca_set_global_sleep_multiplier (which is already
optional).

This change does not make any of the changes suggested in the "Library
Initialization" section of the above doc.
2024-04-03 22:03:54 -07:00
maxerba 4e32c90b7d Updating spanish translation 2024-04-01 18:35:16 +02:00
maxerba 5e25ae24f8 Adding french comment and updating italian 2024-03-14 18:49:10 +01:00
rafspiny 3def50bd6a Use proper icon
Add icon to edj file

Correct icon

Enable sync for edje keyboard lock/unlock
Fix keyboard signals in icon
Using the correct part from the edje
2024-03-12 07:19:50 -07:00
rafspiny 318de512f2 Make instances extern
WIP
2024-03-12 07:19:50 -07:00
rafspiny 5efba6f8a3 Remove unused code 2024-03-12 07:19:50 -07:00
rafspiny f34460bf96 Introduce version for config 2024-03-12 07:19:50 -07:00
rafspiny bd1ebaebad Add e prefix to signales 2024-03-12 07:19:50 -07:00
rafspiny 74cd743aa0 Add typedef enum
Specify no parameters on some functions
2024-03-12 07:19:50 -07:00
rafspiny 16bf105f34 Fix icon and translate strign 2024-03-12 07:19:50 -07:00
rafspiny dcf621326b Rebase 2024-03-12 07:19:50 -07:00
rafspiny bb37914492 Fix icon 2024-03-12 07:19:50 -07:00
rafspiny e7fb1684ce Allegedly using the icon from edj 2024-03-12 07:19:50 -07:00
rafspiny a2bdd3c3ff Move icon for convertible configuration to screen section 2024-03-12 07:19:50 -07:00
rafspiny 801e552985 Add border to icon
Add filling to icon
2024-03-12 07:19:50 -07:00
rafspiny 8c184e7ef0 Address shadowing warnings 2024-03-12 07:19:50 -07:00
rafspiny 5992d94c85 Silly me. Order! 2024-03-12 07:19:50 -07:00
rafspiny 6939a34c1d Prefix local functions static. 2024-03-12 07:19:50 -07:00
rafspiny 1f36cc158b Prefix local static functions with underscore. 2024-03-12 07:19:50 -07:00
rafspiny b12978c7c9 Prefix local static functions with underscore. 2024-03-12 07:19:50 -07:00
rafspiny ffd51d8fca WIP 2024-03-12 07:19:50 -07:00
rafspiny 5e7fa42b8c Make some functions static 2024-03-12 07:19:50 -07:00
rafspiny d60a6fd16b Forgot to update reference to renamed enum values 2024-03-12 07:19:50 -07:00
rafspiny 5b042e08e2 Forgot to update reference to renamed enum values 2024-03-12 07:19:50 -07:00
rafspiny fbfd52f679 Forgot to update reference to renamed enum values 2024-03-12 07:19:50 -07:00
rafspiny faa5c6ae84 Functions renaming 2024-03-12 07:19:50 -07:00
rafspiny 095e14f439 Syntax sugar in for loops 2024-03-12 07:19:50 -07:00
rafspiny fc30c75946 More readable strcmp in ifs 2024-03-12 07:19:50 -07:00
rafspiny a139e88811 Enum with all caps values. 2024-03-12 07:19:50 -07:00
rafspiny 43b233348a Other minor changes 2024-03-12 07:19:50 -07:00
rafspiny 4ea8172e51 Correctly defien function with no params 2024-03-12 07:19:50 -07:00
rafspiny 479b83eb81 Other minor changes 2024-03-12 07:19:50 -07:00
rafspiny d2ccd898f9 Use strdup 2024-03-12 07:19:50 -07:00
rafspiny 3c3a1ac603 Removed dbus initialization 2024-03-12 07:19:50 -07:00
rafspiny 608e2fcebf Address calloc failure 2024-03-12 07:19:50 -07:00
rafspiny ff71a650c2 Address linting comments. 2024-03-12 07:19:50 -07:00
rafspiny 1edbc5cca4 Fix icon 2024-03-12 07:19:50 -07:00
rafspiny 7f33315dcd First attempt at integrating convertible module 2024-03-12 07:19:50 -07:00
Carsten Haitzler e10a0d2be1 clock module - fix - free handlers on mod shudtown
@fix
2024-03-06 18:57:43 +00:00
Carsten Haitzler efe2f7b267 wl - put in hardcoded 16x16 image for wl logo if file not found
if someone has removed the wl logo png file or it fails to load - use
a hardcoded low res 16x16 image data set instead of the wl logo. this
way we have a watermark that works so we know it's wayland or not.
2024-03-04 20:18:37 +00:00
Carsten Haitzler ed64f9e0b8 desklock - fix kbd layout set for desklock so it works
e just didn't store the kbd layout - set it up if it is not on desklock
based on layout name stored.

@fix
2024-02-24 20:43:03 +00:00
Carsten Haitzler 5a5059b058 notification - timeout - handling was jut broken - fix
this totally didnt' get timeout was in ms - it mis-handled setting the
value thinking it was  double or float - it wasn't.. this fixes it.

Fixes #63

@fix
2024-02-09 18:09:59 +00:00
Carsten Haitzler 7eea5fb897 fix 2nd pager copy of same zone not updating selected state
this fixes #29

@fix
2024-01-28 12:21:18 +00:00
maxerba 6bfef9f30c Updating polish translation 2024-01-26 21:46:07 +01:00
maxerba c9bf720f9e Updating french and portuguese translations 2024-01-24 11:05:21 +01:00
maxerba 9377f96932 Updating all po files 2024-01-23 21:55:23 +01:00
maxerba 6c5358f4cd Copyright notice update 2024-01-23 21:10:11 +01:00
Carsten Haitzler a6d7a2235a copying - update dates 2024-01-22 10:53:02 +00:00
Carsten Haitzler cc4df8d320 paranoia for silly people - check efl version aty runtime via eina
enlightenment_start checks the efl version and complains if it's too
old. this shoulpd at runtime give some sensible output for shen
someone did somthing very silly. it'll write this to stderr AND to
~/.e-log.log
2024-01-17 18:37:31 +00:00
maxerba 25640ae2fa Updating french, italian and portuguese translations 2023-12-28 15:16:24 +01:00
Carsten Haitzler aa5fbfb1d3 systray - fix re-fill on gadcon re-create e.g. when changing shelf cfg
change shelf config like orientation and systray goes blank. this
fixes it - delays re-fill to after main loop return with 0 sec timer

fixes #53

@fix
2023-12-27 13:57:34 +00:00
Carsten Haitzler c0cf9176dc go back to .99 devel ver 2023-12-26 23:24:06 +00:00
Carsten Haitzler 22d130f3ce release - 0.26.0 2023-12-23 16:08:09 +00:00
Carsten Haitzler 5a493a5594 fix crash on trying to writer to non-writable input method file 2023-12-18 15:38:00 +00:00
Carsten Haitzler 98e9c79246 make xrandr command use an actual option 2023-12-14 07:40:05 +00:00
Carsten Haitzler 3311cc0790 Merge branch 'NorwayFun-master' 2023-11-14 09:54:20 +00:00
Andre Schulz 850c1ad41a mixer: alsa: Handle error from _alsa_card_create()
_alsa_card_create() can return NULL which can lead to a segmentation
fault inside ALSA when NULL is passed to snd_mixer_first_elem() in
_alsa_cards_refresh(). See the following crash dump excerpt:

Thread 1 (Thread 0x7fe64b227780 (LWP 3320) "enlightenment"):
#0  0x00007fe64c2fbd92 in __libc_pause () at ../sysdeps/unix/sysv/linux/pause.c:29
        sc_ret = -514
        sc_cancel_oldtype = 0
        sc_ret = <optimized out>
#1  <signal handler called>
No locals.
#2  list_empty (p=0x20) at /var/tmp/portage/media-libs/alsa-lib-1.2.9/work/alsa-lib-1.2.9/include/list.h:114
No locals.
#3  snd_mixer_first_elem (mixer=mixer@entry=0x0) at /var/tmp/portage/media-libs/alsa-lib-1.2.9/work/alsa-lib-1.2.9/src/mixer/mixer.c:803
No locals.
#4  0x00007fe63b2a376f in _alsa_cards_refresh () at ../enlightenment-0.25.4/src/modules/mixer/lib/backends/alsa/alsa.c:304
        buf = "hw:0\000le.emix.cfg\000C\236:\245U\000\000\035\221.;\346\177\000\000`>[;\245U\000\000\260g\302:\245U\000\000pL[;\245U\000\000ʁ-:\245U\000\000/home/andre/.e/e/config/standard/module.gadman.cfg", '\000' <repeats 710 times>...
        mixer = 0x0
        device_name = <optimized out>
        elem = <optimized out>
        source = 0x0
        sink = 0x0
        err = <optimized out>
        card_num = 0
        tmp_source = 0x0
        tmp_sink = 0x0
2023-11-14 09:53:09 +00:00
maxerba 4072be6ee7 Updating serbian translation 2023-11-14 09:53:09 +00:00
Andre Schulz 4bd15e3fec mixer: alsa: Handle error from _alsa_card_create()
_alsa_card_create() can return NULL which can lead to a segmentation
fault inside ALSA when NULL is passed to snd_mixer_first_elem() in
_alsa_cards_refresh(). See the following crash dump excerpt:

Thread 1 (Thread 0x7fe64b227780 (LWP 3320) "enlightenment"):
#0  0x00007fe64c2fbd92 in __libc_pause () at ../sysdeps/unix/sysv/linux/pause.c:29
        sc_ret = -514
        sc_cancel_oldtype = 0
        sc_ret = <optimized out>
#1  <signal handler called>
No locals.
#2  list_empty (p=0x20) at /var/tmp/portage/media-libs/alsa-lib-1.2.9/work/alsa-lib-1.2.9/include/list.h:114
No locals.
#3  snd_mixer_first_elem (mixer=mixer@entry=0x0) at /var/tmp/portage/media-libs/alsa-lib-1.2.9/work/alsa-lib-1.2.9/src/mixer/mixer.c:803
No locals.
#4  0x00007fe63b2a376f in _alsa_cards_refresh () at ../enlightenment-0.25.4/src/modules/mixer/lib/backends/alsa/alsa.c:304
        buf = "hw:0\000le.emix.cfg\000C\236:\245U\000\000\035\221.;\346\177\000\000`>[;\245U\000\000\260g\302:\245U\000\000pL[;\245U\000\000ʁ-:\245U\000\000/home/andre/.e/e/config/standard/module.gadman.cfg", '\000' <repeats 710 times>...
        mixer = 0x0
        device_name = <optimized out>
        elem = <optimized out>
        source = 0x0
        sink = 0x0
        err = <optimized out>
        card_num = 0
        tmp_source = 0x0
        tmp_sink = 0x0
2023-09-14 20:22:17 +02:00
maxerba 942a6bf135 Updating serbian translation 2023-08-22 19:20:55 +02:00
NorwayFun f1fb27aa2d po: update Georgian translation 2023-07-23 04:50:46 -07:00
Carsten Haitzler d8acc8d563 fix ukrainian lang entry to uk_UA from uk_UK 2023-07-01 19:04:05 +01:00
maxerba 1974113d1a Updating french and italian translations 2023-06-20 13:02:45 +02:00
Carsten Haitzler b775f51c82 Add option to set hidden state or not 2023-06-17 11:56:57 +01:00
maxerba 54c65ae38a Updating portuguese translation 2023-04-29 12:28:09 +02:00
Carsten Haitzler 81d7fb15ab exec - store out incremented sutartup id to avoid clashes - fix
@fix
2023-04-17 12:27:33 +01:00
Ross Vandegrift c18c52f36a Avoid using "mips" as a variable
Summary:
"mips" is a gcc system-specific predefined macro on mipsel & mips64el.  This
fixes compilation on those platforms.

References:
- https://gcc.gnu.org/onlinedocs/cpp/System-specific-Predefined-Macros.html
- https://gcc.gnu.org/pipermail/gcc-help/2020-August/139241.html

Fixes T8781

Test Plan: built on a debian mipsel porterbox

Reviewers: raster, devilhorns

Subscribers: cedric, zmike

Tags: #enlightenment-git

Maniphest Tasks: T8781

Differential Revision: https://phab.enlightenment.org/D12096
2023-04-08 21:42:02 -07:00
maxerba 39cb8e6280 Updating french and italian translations 2023-04-01 10:56:35 +02:00
Carsten Haitzler d15de275f8 po - update po files with any missing etc. strings 2023-03-29 19:35:27 +01:00
maxerba 36236e6e46 Updating french translation 2023-03-23 19:04:10 +01:00
Nekobit 766360359b xinput: Fix typo, add config check 2023-03-18 01:37:00 -07:00
Nekobit 78470d03d9 xinput: Adjust style 2023-03-18 01:37:00 -07:00
Nekobit 98a9609f8c xinput: Add support for flat mouse acceleration and Hi-Res scrolling
Flat mouse accel is fairly obvious.
Hi-Res scrolling is an option that is useful on certain mice that technically support 'pixel-perfect' scrolling, but still 'click' like regular mice would when you scroll. Some mice are designed to use pixel-perfect scrolling, so keeping it optional is useful.
2023-03-18 01:37:00 -07:00
maxerba 7baf84c1dc Updating french translation 2023-03-14 17:59:37 +01:00
Carsten Haitzler 0c6b0645bd mixer - ignore Peak detect named out src from pavucontrol
pavucontrol does the same thing e and emixer do - monitor
input/recording sources to show a vu meter to show current input
levels when appropriate. ignore these as they are not actually
recording audio - just monitoring them and thus from a user experience
point of view probably should be ignored.
2023-03-07 08:00:51 +00:00
Carsten Haitzler ef788779f9 evrything - fix handling of broken strings without looping forever
this should fix #20

enlightenment/enlightenment#20
@fix
2023-03-05 09:35:51 +00:00
maxerba 1b9d1c9796 Updating french translation 2023-03-01 21:27:52 +01:00
Carsten Haitzler 1cb02d3480 dpms - fix cases where screensavwr was off but dpms still on
@fix
2023-02-16 22:48:43 +00:00
Carsten Haitzler a6038af68f icon theme - set elm icon theme to same theme as e one ... sync them 2023-02-16 08:28:47 +00:00
Carsten Haitzler 13454ff0bb randr - add some more debug info to log 2023-02-16 08:28:47 +00:00
NorwayFun 9542815c2c po: add Georgian translation 2023-02-13 11:45:20 -08:00
NorwayFun 2b00b6fbc9 po: add Georgian translation 2023-02-13 11:45:20 -08:00
Carsten Haitzler 72d639d1a6 desklock - fix compile warn after last change (no real bug) 2023-02-12 20:23:56 +00:00
Carsten Haitzler cb2bc1d1c1 desklock - use immediate show for lock on suspend etc.
makes lock more correct and not fade in on lock on suspend

@feat
2023-02-10 22:21:54 +00:00
Carsten Haitzler fd3e4a645d e state - add simple string glob listener callbacks 2023-02-10 08:48:23 +00:00
kikadf e5e3750ce1 Use default way to locale listing on OpenBSD
Listing /usr/share/locale doesn't work, and
already OpenBSD has support for locale.
2023-02-10 00:47:27 -08:00
kikadf 1b6d81a352 Fix hibernate command on OpenBSD 2023-02-10 00:46:40 -08:00
Carsten Haitzler 9882110357 mixer - be explicit on pluse started flag being false
while runtime linking/compiler will make sure these are zero  by
default normally... be explicit.
2023-02-07 09:51:33 +00:00
Carsten Haitzler 42eedd5fe8 randr - fix xrandr output off/on/config gen to not miss outputs 2023-01-23 21:13:58 +00:00
Carsten Haitzler fd64bd69c6 e - bump efl version needed to git 2023-01-20 20:27:45 +00:00
Carsten Haitzler 882261d8e2 odd to miss void for no params - be clear its no params 2023-01-20 14:47:45 +00:00
Carsten Haitzler 21ac62127c state system - add start of it
Why this? A way to have a shared store of "variables" or states that
any part of e or modules can store some simple things in and thus also
broadcast changes to state, listen to changes in state and react.

I am thinking of things like advertising:

  "/power/ac"               = [ true | false ]
  "/power/battery/low"      = [ true | false ]
  "/power/battery/charging" = [ true | false ]
  "/power/state"            = [ "on" | "sleep" ]
  "/screen"                 = [ "on" | "dim" | "blank" ]
  "/screen/locked"          = [ true | false ]
  "/network/online"         = [ true | false ]
  "/network/location"       = "name of network detected"
2023-01-20 14:47:45 +00:00
Carsten Haitzler acb59e1c78 randr - for now don't just suspend when on battery and end up at 0 scr 2023-01-20 14:47:45 +00:00
Carsten Haitzler 5c4f26f251 power - add some debug printfs for info on what is going on 2023-01-20 14:47:45 +00:00
Carsten Haitzler 53a21b1b0d mixer - add params to allow increase/decrease by a given percentage
now can pass a value like 1 or 2 or 3 to go up 1, 2 or 3% instead of
the default (with no params) of 5%
2023-01-20 14:47:45 +00:00
Carsten Haitzler e584097d45 backlight - fiddle some to try make backlight work better 2023-01-20 14:47:45 +00:00
Carsten Haitzler 239d989e59 randr - fix xrandr cmdline gen to turn screens off too 2023-01-20 14:47:45 +00:00
maxerba 0ef9451d2c Updating french translation 2023-01-08 17:03:08 +01:00
Carsten Haitzler 913b7d701a desklock - dont care if we suspend or not when we run lock/unlock apps
@fix
2022-12-29 12:13:27 +00:00
Carsten Haitzler 5a6fb2450c music control - dont add another desklock handler if one is already
@fix
2022-12-29 12:05:48 +00:00
Carsten Haitzler 6cca3f77e8 ibar - kill off ibar not in order icon if last window for exe goes away
@fix
2022-12-12 19:52:46 +00:00
Carsten Haitzler 6122bf24bb client - handlie class names with a space and guess first word as dsktp
stolen idea from moksha - wrote it differently :)
@feat
2022-12-12 19:03:14 +00:00
Carsten Haitzler a6c68aaf5e blanking/screensaver/dpms - in x poll 10s and force blank settings
so some apps/clients mess with screensaver/blanking/dpms behind e's
back. work around this - every 10 sec poll and check (ugly) and if
things are nto set as they should be ... force them to be set that
way. may lead to fights over this but too many people complaining
about steam or other apps messing with this.
2022-12-09 08:44:59 +00:00
Christopher Michael 5ccfb44404 wl_drm: Fix formatting
You know...If we actually enforced our code formatting rules before
commit, then I could be saving a lot of time by not having to make a
bunch of formatting commits just so code is readable :/

NB: No functional changes
2022-12-07 07:00:05 -05:00
Carsten Haitzler a8f174e6c7 dbus - fix some ref/unref's for conns
@fix
2022-11-21 08:28:23 +00:00
Carsten Haitzler bcf795d47f x11 comp randr - allow/use xrandr cmdline for screen cfg
Something has changed in x where now rotated displays if you have
multiple screens don't vcome up right - an alternate for now is to run
xrandr commandline if it exsts. Not stricly a fix - a workaround.
2022-11-21 08:28:23 +00:00
maxerba 7d21b19347 Updating french translation 2022-11-20 09:23:10 +01:00
Carsten Haitzler e4cfb3c50c notification - fix crash if clicking close while close anim happens
@fix
2022-11-19 14:27:27 +00:00
Carsten Haitzler 2386831529 notification - stop allocating wrong struct type for noti actions
the structs size was bigger so it didnt cause any real problem other
than allocating too much mem. this fixes that
2022-11-19 14:27:27 +00:00
maxerba 79a7c8e95c Updating french translation 2022-11-07 19:46:33 +01:00
Carsten Haitzler 1a58e0e582 procstats - delete callbacks when client is deleted
evas object may still be around and call callbacks still registered
when client sis del'd - so remove callback in client delete in
procstats.

@fix.
2022-11-06 09:39:16 +00:00
maxerba 38178d8c46 Updating portuguese and italian translations 2022-10-30 14:45:18 +01:00
maxerba 5d49dceb36 Updating french translation 2022-10-27 13:11:10 +02:00
maxerba 456713da90 Updating french and portuguese translations 2022-10-19 23:09:40 +02:00
Marcel Hollerbach 928cf22f3e fix error message 2022-09-16 01:36:53 -07:00
Marcel Hollerbach f1d43c42a3 e_pointer: try to be sane with x11 and wl
wl does not have fallback rendering, therefore we always fallback to
default. In x11 we fallback to x11 rendering the cursor.

This should logically now not result in the cursor canvas beeing
deleted.
2022-09-16 01:36:53 -07:00
Marcel Hollerbach 5cc6f31035 e_pointer: do not call x11 setup when on wl path 2022-09-16 01:36:53 -07:00
Marcel Hollerbach 9778dc9738 more output 2022-09-16 01:36:53 -07:00
Carsten Haitzler 319b307c59 enlightenment_system - harden - no sysactions.conf - deny all actions 2022-09-15 15:17:53 +01:00
Carsten Haitzler cc7faeccf7 enlightenment_sys - fix security hole CVE-2022-37706
https://github.com/MaherAzzouzi/CVE-2022-37706-LPE-exploit

fixes that.
@fix
2022-09-15 14:38:21 +01:00
Carsten Haitzler fe0945600a win - shapes - set pass events if we have shaped wins but no rects
could be an EMPTY set of input rects but shaped still... so pass
events on the comp obj.

fixes recordmydesktop

@fix
2022-09-11 15:35:54 +01:00
Carsten Haitzler 47e9eae4ed wl desktop session file - some dm's dont like VAR=x without env
add env at the start as they dont seem to like running things with just

VAR=x VAR2=y cmd

enlightenment happily does this... sddm does not it seems.
2022-09-11 11:59:30 +01:00
Carsten Haitzler 2e30f391fb notification - fix property name for suppress sound 2022-09-09 09:40:38 +01:00
Carsten Haitzler 05e150ad43 e wl - force gl for wl mode now due to kernel breaks
also make session file do this by default for wl mode.

@fix (work around kernel changes?)
2022-08-26 08:53:03 +01:00
Christopher Michael a5d004a49b e_int_client_prop: Fix ICCCM/NetWM dialog issues
Make this dialog resizable for reading longer text (window titles,
etc). Also, fix the layout silliness that was going on by aligning the
table entries properly.

This dialog looked like crap :( Let's fix that :)
2022-08-20 11:12:00 -04:00
Carsten Haitzler 2294ea9f8a update id - use longer sha1 hash for id 2022-08-20 08:51:50 +01:00
Carsten Haitzler 3c46a6796a blanking block menu - show more info like reason. 2022-08-09 09:25:10 +01:00
Carsten Haitzler 88d7e3b836 screensaver blanking dbus api - also support /ScreenSaver path 2022-08-09 09:19:19 +01:00
Carsten Haitzler c93c976069 use XSession type - it seems some dm's are enforcing a non-standard
they insist on Type=XSession or you end up with a blank screen. this
was never defined as the standard. wm's have been using
Type=Application for decades! it's still documented in many places as
the way to add a custom session too. this is a workaround these stupid
DM's insisting on this. There is no good reason to make these changes.
2022-08-03 15:28:54 +01:00
Carsten Haitzler aaf317b61d mesgbus - fix nukll name dbus string send
This fixes #11
2022-08-01 17:11:42 +01:00
Carsten Haitzler 225cbac56f watchdog - fix size of ping seq buffer entries 2022-07-20 15:53:56 +01:00
Carsten Haitzler bea94314bd allow multiple mimes and actions on files in efm 2022-07-20 15:36:30 +01:00
Carsten Haitzler db3ea64dd3 terms - expand fallback list of term desktops 2022-07-05 13:06:21 +01:00
Carsten Haitzler c2869268d8 term list - move to a single file to list possible terminal desktops 2022-07-05 12:48:19 +01:00
Carsten Haitzler 5980468f7f enlightenment_open - handle Terminal=true properly not just scheme
This makes termina-ltrue launch properly from enlightemnent_open as
you might expect as it works from core e already when it launches/

@fix
2022-07-05 12:34:58 +01:00
Carsten Haitzler daabedaac1 execution - add more terminal desktops to fallback list 2022-07-05 11:56:38 +01:00
Carsten Haitzler 130535af97 win - first map - fix energyxt unmap bug by wiping ignore unmap
For some reason I have yet to divine we don't get an initial unmap
event due to the reparent of the energyxt dialog windows and the
"ignore that first unmap" flag does not get cleared because it doesn't
happen. later when the dialog is withdrawn {9unmapped) this is ignored
then when you close the dialog... thus keeping it around as far as e
is concerned.

so to fix this - add a small timeout to clean this flag after a
show/map.

@fix
2022-07-05 09:25:35 +01:00
Carsten Haitzler a39341d4a6 fix typo 2022-06-23 11:32:12 +01:00
Carsten Haitzler 3d4789531d fix readme a bit 2022-06-23 11:31:05 +01:00
Carsten Haitzler 70a5f83cf7 reamde - note nvidia issues 2022-06-23 11:25:19 +01:00
Carsten Haitzler 2bc9efc261 e sound - forgot to call init - call init 2022-06-18 12:24:41 +01:00
Carsten Haitzler 2b095b67d1 notification - play sound samples and advertise it in caps 2022-06-18 12:23:02 +01:00
Carsten Haitzler 91e797eab7 add simple sound play api to play samples 2022-06-18 12:20:05 +01:00
Carsten Haitzler b312bb3aa6 notifications - send signals for cateogry and urgency 2022-06-18 10:09:40 +01:00
Carsten Haitzler cdad184547 notification module - handle misnamed desktop files e.g. firefox 2022-06-18 09:35:51 +01:00
Carsten Haitzler bfd175e985 notification - remove unused func 2022-06-18 09:26:52 +01:00
Carsten Haitzler b23eedae98 notifications - extend to support actions, links and img tags
we didn't support enough of noktifications to make everyone happy -
this is why ffox, chrome etc. did their own notification windows and
didn't use e's notifications. we now advertise doing everything. we
say w edo sound though don't.... will add that later, but this now
means we really do a lot more and thus pushes these other
notifications into e's notifications so we're much better now and this
annoyance i have noticed is now gone.

@feat
2022-06-18 00:46:12 +01:00
maxerba 1933f745f2 Updating french and italian translation 2022-06-18 00:04:37 +02:00
Carsten Haitzler 7dcf43051f watchdog - enable. it seems to work fine for me... and that's good. 2022-06-16 15:45:29 +01:00
Carsten Haitzler dbcc56014c fix move to defines for msgbus dbus services for iface/core 2022-06-16 15:45:03 +01:00
149 changed files with 392985 additions and 381409 deletions

View File

@ -1,6 +1,6 @@
Copyright notice for Enlightenment:
Copyright (C) 2000-2020 Carsten Haitzler and various contributors (see AUTHORS)
Copyright (C) 2000-2024 Carsten Haitzler and various contributors (see AUTHORS)
All rights reserved.

View File

@ -214,3 +214,12 @@ regular end users) use the meson `-Dwl=true option`. To run Enlightenment in
Wayland mode, just login on any text VT and run `enlightenment_start`. If you
wish to debug and see all the output try using something like screen then
attaching to the remote screen session by sshing in etc.
-----
**NOTE:** Nvidia support - do *not* enable Wayland support if you have
Nvidia cards and use Nvidia drivers. You will need to use **full**
OpenGL+GLX with EFL instead of the default OpenGL-ES/EGL for those to not
have problems and this conflicts with any **DRM** and **Wayland** support.
You will

View File

@ -58,7 +58,8 @@ group "E_Config" struct {
value "winlist_mode" int: 1;
value "winlist_large_size" double: 0.6666;
value "winlist_list_size" double: 0.3333;
value "winlist_list_no_miniatures" int: 0;
value "winlist_list_no_miniatures" uchar: 0;
value "no_state_hidden_desktop" uchar: 0;
value "maximize_policy" int: 49;
value "allow_manip" int: 0;
value "border_fix_on_shelf_toggle" int: 0;
@ -139,6 +140,8 @@ group "E_Config" struct {
value "clientlist_max_caption_len" int: 2;
value "mouse_hand" int: 1;
value "mouse_accel" double: 0.0;
value "mouse_flat_accel" uchar: 0;
value "mouse_hires_scroll" uchar: 1;
value "mouse_accel_threshold" int: 4;
value "mouse_natural_scroll" uchar: 0;
value "mouse_emulate_middle_button" uchar: 1;
@ -146,6 +149,7 @@ group "E_Config" struct {
value "touch_natural_scroll" uchar: 0;
value "touch_emulate_middle_button" uchar: 1;
value "touch_tap_to_click" uchar: 0;
value "touch_flat_accel" uchar: 0;
value "touch_clickpad" uchar: 1;
value "touch_scrolling_2finger" uchar: 1;
value "touch_scrolling_edge" uchar: 0;

View File

@ -54,7 +54,8 @@ group "E_Config" struct {
value "winlist_mode" int: 1;
value "winlist_large_size" double: 0.6666;
value "winlist_list_size" double: 0.3333;
value "winlist_list_no_miniatures" int: 0;
value "winlist_list_no_miniatures" uchar: 0;
value "no_state_hidden_desktop" uchar: 0;
value "maximize_policy" int: 50;
value "allow_manip" int: 0;
value "border_fix_on_shelf_toggle" int: 0;
@ -137,6 +138,8 @@ group "E_Config" struct {
value "clientlist_max_caption_len" int: 2;
value "mouse_hand" int: 1;
value "mouse_accel" double: 0.0;
value "mouse_flat_accel" uchar: 0;
value "mouse_hires_scroll" uchar: 1;
value "mouse_accel_threshold" int: 4;
value "mouse_natural_scroll" uchar: 0;
value "mouse_emulate_middle_button" uchar: 1;
@ -144,6 +147,7 @@ group "E_Config" struct {
value "touch_natural_scroll" uchar: 0;
value "touch_emulate_middle_button" uchar: 1;
value "touch_tap_to_click" uchar: 0;
value "touch_flat_accel" uchar: 0;
value "touch_clickpad" uchar: 1;
value "touch_scrolling_2finger" uchar: 1;
value "touch_scrolling_edge" uchar: 0;

View File

@ -54,7 +54,8 @@ group "E_Config" struct {
value "winlist_mode" int: 1;
value "winlist_large_size" double: 0.6666;
value "winlist_list_size" double: 0.3333;
value "winlist_list_no_miniatures" int: 0;
value "winlist_list_no_miniatures" uchar: 0;
value "no_state_hidden_desktop" uchar: 0;
value "maximize_policy" int: 50;
value "allow_manip" int: 0;
value "border_fix_on_shelf_toggle" int: 0;
@ -138,12 +139,15 @@ group "E_Config" struct {
value "mouse_hand" int: 1;
value "mouse_accel" double: 0.0;
value "mouse_accel_threshold" int: 4;
value "mouse_flat_accel" uchar: 0;
value "mouse_hires_scroll" uchar: 1;
value "mouse_natural_scroll" uchar: 0;
value "mouse_emulate_middle_button" uchar: 1;
value "touch_accel" double: 0.0;
value "touch_natural_scroll" uchar: 0;
value "touch_emulate_middle_button" uchar: 1;
value "touch_tap_to_click" uchar: 0;
value "touch_flat_accel" uchar: 0;
value "touch_clickpad" uchar: 1;
value "touch_scrolling_2finger" uchar: 1;
value "touch_scrolling_edge" uchar: 0;

View File

@ -34,5 +34,5 @@ Comment[sr]=Пријавите се за коришћење Просвећења
Comment[tr]=Enlightenment kullanarak giriş yaın (Version @VERSION@)
Icon=@prefix@/share/enlightenment/data/images/enlightenment.png
TryExec=@prefix@/bin/enlightenment_start
Exec=@prefix@/bin/enlightenment_start
Exec=env E_WL_FORCE=drm E_COMP_ENGINE=gl @prefix@/bin/enlightenment_start
DesktopNames=Enlightenment

View File

@ -1,5 +1,5 @@
[Desktop Entry]
Type=Application
Type=XSession
Name=Enlightenment
Name[ca]=Enlightenment
Name[de]=Enlightenment

View File

@ -1,6 +1,6 @@
##### project
project('enlightenment', 'c',
version : '0.25.99',
version : '0.26.99',
license : 'BSD 2 clause',
default_options: [ 'buildtype=release', 'c_std=gnu99', 'warning_level=2' ],
meson_version : '>= 0.47.0')
@ -30,7 +30,7 @@ else
config_h.set('E_RELEASE_BUILD' , '1')
endif
efl_version = '>= 1.26.0'
efl_version = '>= 1.27.0'
add_global_arguments('-DHAVE_CONFIG_H=1', language: 'c')
dir_prefix = get_option('prefix')
@ -83,6 +83,11 @@ config_h.set('_POSIX_PTHREAD_SEMANTICS', '1')
config_h.set('_TANDEM_SOURCE' , '1')
config_h.set('__EXTENSIONS__' , '1')
str_ver_split = efl_version.replace('>= ', '').split('.')
config_h.set('MIN_EFL_VERSION_MAJ', str_ver_split[0])
config_h.set('MIN_EFL_VERSION_MIN', str_ver_split[1])
config_h.set('MIN_EFL_VERSION_MIC', str_ver_split[2])
subdir('po')
darwin = host_machine.system().startswith('darwin')
@ -293,6 +298,7 @@ dep_ecore_con = dependency('ecore-con' , required: true)
dep_ecore_input = dependency('ecore-input' , required: true)
dep_ecore_input_evas = dependency('ecore-input-evas', required: true)
dep_ecore_evas = dependency('ecore-evas' , required: true)
dep_ecore_audio = dependency('ecore-audio' , required: true)
dep_evas = dependency('evas' , required: true)
dep_edje = dependency('edje' , required: true)
dep_efreet = dependency('efreet' , required: true)

View File

@ -132,6 +132,10 @@ option('connman',
type: 'boolean',
value: true,
description: 'enable connman module: (default=true)')
option('convertible',
type: 'boolean',
value: true,
description: 'enable convertible module: (default=true)')
option('cpufreq',
type: 'boolean',
value: true,

View File

@ -18,6 +18,7 @@ hr
hu
it
ja
ka
km
ko
lt

20025
po/ar.po

File diff suppressed because it is too large Load Diff

20867
po/bg.po

File diff suppressed because it is too large Load Diff

19662
po/ca.po

File diff suppressed because it is too large Load Diff

19972
po/cs.po

File diff suppressed because it is too large Load Diff

19509
po/da.po

File diff suppressed because it is too large Load Diff

19693
po/de.po

File diff suppressed because it is too large Load Diff

19980
po/el.po

File diff suppressed because it is too large Load Diff

19632
po/eo.po

File diff suppressed because it is too large Load Diff

20304
po/es.po

File diff suppressed because it is too large Load Diff

21228
po/et.po

File diff suppressed because it is too large Load Diff

19618
po/fi.po

File diff suppressed because it is too large Load Diff

18822
po/fo.po

File diff suppressed because it is too large Load Diff

1107
po/fr.po

File diff suppressed because it is too large Load Diff

20946
po/fr_CH.po

File diff suppressed because it is too large Load Diff

19786
po/gl.po

File diff suppressed because it is too large Load Diff

21150
po/he.po

File diff suppressed because it is too large Load Diff

20716
po/hr.po

File diff suppressed because it is too large Load Diff

19739
po/hu.po

File diff suppressed because it is too large Load Diff

933
po/it.po

File diff suppressed because it is too large Load Diff

20667
po/ja.po

File diff suppressed because it is too large Load Diff

16681
po/ka.po Normal file

File diff suppressed because it is too large Load Diff

18687
po/km.po

File diff suppressed because it is too large Load Diff

19809
po/ko.po

File diff suppressed because it is too large Load Diff

19027
po/lt.po

File diff suppressed because it is too large Load Diff

21252
po/ms.po

File diff suppressed because it is too large Load Diff

20846
po/nb.po

File diff suppressed because it is too large Load Diff

2199
po/nl.po

File diff suppressed because it is too large Load Diff

21222
po/pl.po

File diff suppressed because it is too large Load Diff

24677
po/pt.po

File diff suppressed because it is too large Load Diff

19991
po/pt_BR.po

File diff suppressed because it is too large Load Diff

20936
po/ro.po

File diff suppressed because it is too large Load Diff

19931
po/ru.po

File diff suppressed because it is too large Load Diff

20881
po/sk.po

File diff suppressed because it is too large Load Diff

19747
po/sl.po

File diff suppressed because it is too large Load Diff

19743
po/sr.po

File diff suppressed because it is too large Load Diff

20925
po/sv.po

File diff suppressed because it is too large Load Diff

19757
po/tr.po

File diff suppressed because it is too large Load Diff

20736
po/uk.po

File diff suppressed because it is too large Load Diff

19653
po/vi.po

File diff suppressed because it is too large Load Diff

19660
po/zh_CN.po

File diff suppressed because it is too large Load Diff

19135
po/zh_TW.po

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@ e_about_new(void)
snprintf
(buf, sizeof(buf), "%s%s",
_(
"<title>Copyright &copy; 2000-2022, by the Enlightenment "
"<title>Copyright &copy; 2000-2024, by the Enlightenment "
"Development Team</><ps/>"
"<ps/>"
"We hope you enjoy using this software as much as we enjoyed "

View File

@ -27,6 +27,9 @@ static Eina_Bool _e_bl_suspend = EINA_FALSE;
static void _backlight_devices_device_set(Backlight_Device *bd, double val);
static void _backlight_devices_device_update(Backlight_Device *bd);
#define MAX_BL_DIFF 0.15
#define SET_RETRIES 5
static Eina_Bool
_backlight_retry_timer_cb(void *data)
{
@ -45,17 +48,17 @@ _backlight_mismatch_retry(Backlight_Device *bd)
((fabs(bd->expected_val - 1.0) < DBL_EPSILON) ||
(fabs(bd->expected_val - e_config->backlight.normal) < DBL_EPSILON) ||
(fabs(bd->expected_val - e_config->backlight.dim) < DBL_EPSILON)) &&
// and the delta between expected and val >= 0.05
(fabs(bd->expected_val - bd->val) >= 0.05) &&
// and we retried < 20 times
(bd->retries < 10) &&
// and the delta between expected and val >= MAX_BL_DIFF
(fabs(bd->expected_val - bd->val) >= MAX_BL_DIFF) &&
// and we retried < SET_RETRIES times
(bd->retries < SET_RETRIES) &&
(_own_vt))
{ // try again
printf("RETRY backlight set as %1.2f != %1.2f (expected) try=%i\n",
bd->val, bd->expected_val, bd->retries);
bd->retries++;
if (bd->retry_timer) ecore_timer_del(bd->retry_timer);
bd->retry_timer = ecore_timer_add(0.1, _backlight_retry_timer_cb, bd);
bd->retry_timer = ecore_timer_add(0.3, _backlight_retry_timer_cb, bd);
} // or give up
else bd->retries = 0;
}
@ -73,10 +76,10 @@ _backlight_system_get_cb(void *data, const char *params)
if (!!strcmp(bd->dev, dev)) return;
e_system_handler_del("bklight-val", _backlight_system_get_cb, bd);
fval = (double)val / 1000.0;
if (fabs(fval - bd->val) >= DBL_EPSILON)
if (fabs(fval - bd->val) >= MAX_BL_DIFF)
{
bd->val = fval;
ecore_event_add(E_EVENT_BACKLIGHT_CHANGE, NULL, NULL, NULL);
// bd->val = fval;
// ecore_event_add(E_EVENT_BACKLIGHT_CHANGE, NULL, NULL, NULL);
_backlight_mismatch_retry(bd);
}
}
@ -97,10 +100,10 @@ _backlight_system_ddc_get_cb(void *data, const char *params)
if (val < 0) fval = -1.0;
else fval = (double)val / 100.0;
bd->ddc_max = max;
if ((fabs(fval - bd->val) >= DBL_EPSILON) || (val == -1))
if ((fabs(fval - bd->val) >= MAX_BL_DIFF) || (val == -1))
{
bd->val = fval;
ecore_event_add(E_EVENT_BACKLIGHT_CHANGE, NULL, NULL, NULL);
// bd->val = fval;
// ecore_event_add(E_EVENT_BACKLIGHT_CHANGE, NULL, NULL, NULL);
_backlight_mismatch_retry(bd);
}
}
@ -791,7 +794,7 @@ e_backlight_level_set(E_Zone *zone, double val, double tim)
if (fabs(tim) < DBL_EPSILON)
{
_backlight_devices_device_set(bd, val);
_backlight_devices_device_update(bd);
// _backlight_devices_device_update(bd);
ecore_event_add(E_EVENT_BACKLIGHT_CHANGE, NULL, NULL, NULL);
return;
}

View File

@ -586,6 +586,8 @@ _e_client_free(E_Client *ec)
if (ec->stack.prev) ec->stack.prev->stack.next = ec->stack.next;
if (ec->stack.next) ec->stack.next->stack.prev = ec->stack.prev;
E_FREE_FUNC(ec->ignore_first_unmap_clear_timer, ecore_timer_del);
ec->e.state.profile.wait_desk = NULL;
evas_object_del(ec->frame);
E_OBJECT(ec)->references--;
@ -2296,6 +2298,29 @@ _e_client_eval(E_Client *ec)
}
}
}
if (!ec->desktop && ec->icccm.class)
{
const char *p = strchr(ec->icccm.class, ' ');
if (p)
{
char *sp, *dup = strdup(ec->icccm.class);
if (dup)
{
for (sp = dup; *dup; sp++)
{
if (*sp == ' ')
{
*sp = 0;
break;
}
}
ec->desktop = efreet_util_desktop_exec_find(dup);
free(dup);
}
}
}
if (!ec->desktop && ec->icccm.name)
{
/* this works for most cases as fallback. useful when app is

View File

@ -302,6 +302,7 @@ struct E_Client
unsigned char ignore_first_unmap;
E_Pointer_Mode resize_mode;
Ecore_Timer *ignore_first_unmap_clear_timer;
struct
{

View File

@ -749,7 +749,7 @@ _e_comp_object_shadow_setup(E_Comp_Object *cw)
else
edje_object_part_swallow(cw->shobj, "e.swallow.content", cw->obj);
}
if (cw->input_objs)
if ((cw->input_objs) || ((cw->ec) && (cw->ec->shaped)))
evas_object_pass_events_set(cw->obj, 1);
else
evas_object_pass_events_set(cw->obj, 0);

View File

@ -2881,7 +2881,7 @@ disp_err:
}
static Eina_Bool
_e_comp_wl_desklock_show(void)
_e_comp_wl_desklock_show(Eina_Bool immediate EINA_UNUSED)
{
return e_comp_grab_input(1, 1);
}

View File

@ -77,6 +77,7 @@ static int screen_size_index = -1;
static Ecore_X_Atom backlight_atom = 0;
static Ecore_Timer *mouse_in_fix_check_timer = NULL;
static Ecore_Timer *_e_comp_x_blank_apply_timer = NULL;
static Eina_Hash *dead_wins;
@ -3463,6 +3464,16 @@ _e_comp_x_frame_extents_adjust(E_Client *ec, int exl, int exr, int ext, int exb)
}
}
static Eina_Bool
_cb_e_comp_x_ignore_first_unmap_clear_timer(void *data)
{
E_Client *ec = data;
ec->ignore_first_unmap_clear_timer = NULL;
if (ec->ignore_first_unmap > 0) ec->ignore_first_unmap--;
return EINA_FALSE;
}
static void
_e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec)
{
@ -3515,6 +3526,9 @@ _e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec)
if (!ec->internal)
ecore_x_window_save_set_add(win);
ec->ignore_first_unmap++;
E_FREE_FUNC(ec->ignore_first_unmap_clear_timer, ecore_timer_del);
ec->ignore_first_unmap_clear_timer = ecore_timer_add
(0.2, _cb_e_comp_x_ignore_first_unmap_clear_timer, ec);
ecore_x_window_reparent(win, pwin, 0, 0);
e_pixmap_alias(ep, E_PIXMAP_TYPE_X, pwin);
@ -5312,6 +5326,7 @@ _e_comp_cb_pointer_suspend_resume_done(void *data, Evas_Object *obj, const char
e_pointer_grab_set(e_comp->pointer, EINA_FALSE);
}
e_screensaver_update();
e_dpms_force_update();
}
EINTERN Eina_Bool
@ -5366,6 +5381,7 @@ _e_comp_x_screensaver_off()
const char *s;
e_screensaver_update();
e_dpms_force_update();
_e_comp_pointer_ungrab();
e_pointer_grab_set(e_comp->pointer, EINA_FALSE);
if ((!e_comp->pointer) || (!e_comp->pointer->o_ptr)) return ECORE_CALLBACK_RENEW;
@ -5746,6 +5762,9 @@ _e_comp_x_manage_windows(void)
evas_object_geometry_set(ec->frame, ec->client.x, ec->client.y, ec->client.w, ec->client.h);
}
ec->ignore_first_unmap = 1;
E_FREE_FUNC(ec->ignore_first_unmap_clear_timer, ecore_timer_del);
ec->ignore_first_unmap_clear_timer = ecore_timer_add
(0.2, _cb_e_comp_x_ignore_first_unmap_clear_timer, ec);
if (ec->override || (!ec->icccm.fetch.hints))
evas_object_show(ec->frame);
_e_comp_x_client_stack(ec);
@ -5808,7 +5827,7 @@ _e_comp_x_desklock_hide(void)
}
static Eina_Bool
_e_comp_x_desklock_show(void)
_e_comp_x_desklock_show(Eina_Bool immedate EINA_UNUSED)
{
if (!e_comp_grab_input(1, 1))
{
@ -6015,6 +6034,13 @@ _e_comp_x_screens_setup(void)
return EINA_FALSE;
}
static Eina_Bool
_e_comp_x_blank_apply(void *data EINA_UNUSED)
{
e_screensaver_force_update();
return EINA_TRUE;
}
E_API Eina_Bool
e_comp_x_init(void)
{
@ -6182,6 +6208,8 @@ e_comp_x_init(void)
e_config->screensaver_blanking,
e_config->screensaver_expose);
e_comp_x_devices_config_apply(EINA_FALSE);
_e_comp_x_blank_apply_timer = ecore_timer_add
(10.0, _e_comp_x_blank_apply, NULL);
}
else
e_dnd_init();
@ -6192,6 +6220,11 @@ e_comp_x_init(void)
E_API void
e_comp_x_shutdown(void)
{
if (_e_comp_x_blank_apply_timer)
{
ecore_timer_del(_e_comp_x_blank_apply_timer);
_e_comp_x_blank_apply_timer = NULL;
}
_e_comp_x_del(e_comp);
E_FREE_LIST(handlers, ecore_event_handler_del);
E_FREE_FUNC(clients_win_hash, eina_hash_free);

View File

@ -144,11 +144,44 @@ _handle_dev_prop(int dev_slot, const char *dev, const char *prop, Device_Flags d
}
free(val);
}
// not for now - default
// else if (!strcmp(prop, "libinput Accel Profile Enabled"))
// {
// // 1 bool, 0 = adaptive, 1 = flat
// }
else if (!strcmp(prop, "libinput Accel Profile Enabled"))
{
// 1 bool, 0 = adaptive, 1 = flat
unsigned char cfval = 0;
unsigned char *val = ecore_x_input_device_property_get
(dev_slot, prop, &num, &fmt, &size);
if (dev_flags == DEVICE_FLAG_TOUCHPAD)
cfval = e_config->touch_flat_accel;
else
cfval = e_config->mouse_flat_accel;
if ((val) && (size == 8) && (num == 2) && (((cfval == 1) && (val[0] == 1)) ||
((cfval == 0) && (val[0] == 0))))
{
// Does a little flip-flop for each variable
val[0] = !cfval;
val[1] = cfval;
printf("DEV: change [%s] [%s] -> %i, %i\n", dev, prop, val[0], val[1]);
ecore_x_input_device_property_set
(dev_slot, prop, val, num, fmt, size);
}
free(val);
}
else if (!strcmp(prop, "libinput High Resolution Wheel Scroll Enabled"))
{
unsigned char cfval = e_config->mouse_hires_scroll;
unsigned char *val = ecore_x_input_device_property_get
(dev_slot, prop, &num, &fmt, &size);
if ((val) && (size == 8) && (num == 1) && (cfval != val[0]))
{
val[0] = cfval;
printf("DEV: change [%s] [%s] -> %i\n", dev, prop, val[0]);
ecore_x_input_device_property_set
(dev_slot, prop, val, num, fmt, size);
}
free(val);
}
// do via button mapping for now - not sure about this evdev can't do this
// else if (!strcmp(prop, "libinput Left Handed Enabled"))
// {

View File

@ -20,6 +20,7 @@ static Eina_Bool _rotation_exists(int rot, Ecore_X_Randr_Crtc_Info *info);
static Ecore_X_Randr_Mode _mode_screen_find(Ecore_X_Window root, E_Randr2_Screen *s, Ecore_X_Randr_Output out);
static Eina_List *handlers;
static int use_xrandr = -1;
E_Comp_Screen_Iface xiface =
{
@ -501,9 +502,168 @@ e_comp_x_randr_shutdown(void)
E_FREE_LIST(handlers, ecore_event_handler_del);
}
E_API void
e_comp_x_randr_config_apply(void)
static void
_e_comp_xrandr_cmd(void)
{
Eina_List *l;
E_Randr2_Screen *s;
Ecore_X_Window root = ecore_x_window_root_first_get();
int top_priority = 0;
Ecore_X_Randr_Crtc *crtcs = NULL;
Ecore_X_Randr_Output *outputs = NULL, out, *outconf;
E_Randr2_Screen **screenconf;
Ecore_X_Randr_Crtc_Info *info;
int crtcs_num = 0, outputs_num = 0, i, numout;
crtcs = ecore_x_randr_crtcs_get(root, &crtcs_num);
outputs = ecore_x_randr_outputs_get(root, &outputs_num);
printf("RRR: crtcs=%p outputs=%p\n", crtcs, outputs);
if ((crtcs) && (outputs))
{
outconf = alloca(outputs_num * sizeof(Ecore_X_Randr_Output));
screenconf = alloca(outputs_num * sizeof(E_Randr2_Screen *));
memset(outconf, 0, outputs_num * sizeof(Ecore_X_Randr_Output));
memset(screenconf, 0, outputs_num * sizeof(E_Randr2_Screen *));
// decide which outputs get which crtcs
EINA_LIST_FOREACH(e_randr2->screens, l, s)
{
printf("RRR: find output for '%s'\n", s->info.name);
// XXX: find clones and set them as outputs in an array
if ((s->config.configured) &&
(_output_name_find(root, s->info.name, outputs,
outputs_num, &out)))
{
printf("RRR: enabled: %i\n", s->config.enabled);
if (s->config.enabled)
{
if (s->config.priority > top_priority)
top_priority = s->config.priority;
for (i = 0; i < outputs_num; i++)
{
if (!screenconf[i])
{
Ecore_X_Randr_Crtc crtc =
ecore_x_randr_output_crtc_get(root,
outputs[i]);
info = NULL;
printf("RRR: crtc slot empty: %i, crtc=%i, output=%i\n", i, crtc, outputs[i]);
if (crtc)
info = ecore_x_randr_crtc_info_get(root,
crtc);
printf("RRR: crtc info = %p\n", info);
if (info)
{
printf("RRR: output exists=%i rot exists=%i\n",
_output_exists(out, info), _rotation_exists(s->config.rotation, info));
if (_output_exists(out, info) &&
_rotation_exists(s->config.rotation,
info))
{
printf("RRR: assign slot out: %x\n", out);
outconf[i] = out;
screenconf[i] = s;
}
ecore_x_randr_crtc_info_free(info);
}
if (!screenconf[i])
{
printf("RRR: assign slot off\n");
outconf[i] = 0;
screenconf[i] = s;
}
break;
}
}
}
else
{
for (i = 0; i < outputs_num; i++)
{
if (!screenconf[i])
{
printf("RRR: assign slot off 2\n");
outconf[i] = 0;
screenconf[i] = s;
break;
}
}
}
}
}
numout = 0;
for (i = 0; i < outputs_num; i++)
{
if (screenconf[i]) numout++;
}
if (numout)
{
Eina_Strbuf *sb;
E_Randr2_Screen *sc;
sb = eina_strbuf_new();
eina_strbuf_append(sb, "xrandr ");
// set up a crtc to drive each output (or not)
for (i = 0; i < numout; i++)
{
sc = screenconf[i];
if (!sc) continue;
if (!sc->info.name) continue;
eina_strbuf_append_printf(sb, "--output '%s' ",
sc->info.name);
// XXX: find clones and set them as outputs in an array
if (outconf[i])
{
eina_strbuf_append_printf(sb, "--mode %ix%i ",
sc->config.mode.w,
sc->config.mode.h);
eina_strbuf_append_printf(sb, "--refresh %i.%02i ",
(int)sc->config.mode.refresh,
(int)((sc->config.mode.refresh - (int)sc->config.mode.refresh) * 100));
eina_strbuf_append_printf(sb, "--rotate ");
if (screenconf[i]->config.rotation == 0)
eina_strbuf_append_printf(sb, "normal ");
else if (screenconf[i]->config.rotation == 90)
eina_strbuf_append_printf(sb, "left ");
else if (screenconf[i]->config.rotation == 180)
eina_strbuf_append_printf(sb, "inverted ");
else if (screenconf[i]->config.rotation == 270)
eina_strbuf_append_printf(sb, "right ");
eina_strbuf_append_printf(sb, "--pos %ix%i ",
sc->config.geom.x,
sc->config.geom.y);
if (screenconf[i]->config.priority == top_priority)
{
eina_strbuf_append_printf(sb, "--primary ");
top_priority = -1;
}
}
else
{
printf("RRR: crtc off: %i\n", i);
eina_strbuf_append_printf(sb, "--off ");
}
}
printf("RRR: XRANDR: %s\n", eina_strbuf_string_get(sb));
ecore_exe_run(eina_strbuf_string_get(sb), NULL);
eina_strbuf_free(sb);
}
else
{
printf("RRR: EERRRRRROOOORRRRRRR no outputs to configure!\n");
ecore_timer_add(5.0, _cb_no_outputs_timer, NULL);
ecore_x_root_screen_barriers_set(NULL, 0);
}
}
free(outputs);
free(crtcs);
}
static void
_e_comp_xrandr_ecore_x(void)
{
Eina_List *l;
E_Randr2_Screen *s;
Ecore_X_Window root = ecore_x_window_root_first_get();
@ -548,12 +708,13 @@ e_comp_x_randr_config_apply(void)
crtcs = ecore_x_randr_crtcs_get(root, &crtcs_num);
outputs = ecore_x_randr_outputs_get(root, &outputs_num);
printf("RRR: crtcs=%p outputs=%p\n", crtcs, outputs);
if ((crtcs) && (outputs))
{
outconf = alloca(crtcs_num * sizeof(Ecore_X_Randr_Output));
screenconf = alloca(crtcs_num * sizeof(E_Randr2_Screen *));
memset(outconf, 0, crtcs_num * sizeof(Ecore_X_Randr_Output));
memset(screenconf, 0, crtcs_num * sizeof(E_Randr2_Screen *));
outconf = alloca(outputs_num * sizeof(Ecore_X_Randr_Output));
screenconf = alloca(outputs_num * sizeof(E_Randr2_Screen *));
memset(outconf, 0, outputs_num * sizeof(Ecore_X_Randr_Output));
memset(screenconf, 0, outputs_num * sizeof(E_Randr2_Screen *));
// decide which outputs get which crtcs
EINA_LIST_FOREACH(e_randr2->screens, l, s)
@ -569,7 +730,7 @@ e_comp_x_randr_config_apply(void)
{
if (s->config.priority > top_priority)
top_priority = s->config.priority;
for (i = 0; i < crtcs_num; i++)
for (i = 0; i < outputs_num; i++)
{
if (!outconf[i])
{
@ -596,18 +757,18 @@ e_comp_x_randr_config_apply(void)
}
}
numout = 0;
for (i = 0; i < crtcs_num; i++)
for (i = 0; i < outputs_num; i++)
{
if (outconf[i]) numout++;
}
if (numout)
{
Ecore_X_Rectangle *scrs = alloca(crtcs_num * sizeof(Ecore_X_Rectangle));
Ecore_X_Rectangle *scrs = alloca(numout * sizeof(Ecore_X_Rectangle));
int scrs_num;
scrs_num = 0;
// set up a crtc to drive each output (or not)
for (i = 0; i < crtcs_num; i++)
for (i = 0; i < numout; i++)
{
// XXX: find clones and set them as outputs in an array
if (outconf[i])
@ -637,7 +798,7 @@ e_comp_x_randr_config_apply(void)
screenconf[i]->config.geom.x,
screenconf[i]->config.geom.y,
mode, orient))
printf("RRR: failed to set crtc!!!!!!\n");
printf("RRR: failed to set crtc!!!!!!\n");
if (E_INSIDE(px, py,
screenconf[i]->config.geom.x,
screenconf[i]->config.geom.y,
@ -689,7 +850,7 @@ e_comp_x_randr_config_apply(void)
free(outputs);
free(crtcs);
printf("RRR: set vsize: %ix%i\n", nw, nh);
printf("RRR: set vsize2: %ix%i\n", nw, nh);
ecore_x_randr_screen_current_size_set(root, nw, nh, -1, -1);
{
int dww = 0, dhh = 0, dww2 = 0, dhh2 = 0;
@ -704,7 +865,6 @@ e_comp_x_randr_config_apply(void)
ecore_x_randr_screen_size_range_get(root, NULL, NULL, NULL, NULL);
ecore_x_ungrab();
ecore_x_sync();
// ignore the next batch of randr events - we caused them ourselves
// XXX: a problem. thew first time we configure the screen we may not
// get any events back to clear the ignore flag below, so only apply
@ -712,6 +872,22 @@ e_comp_x_randr_config_apply(void)
// event_ignore = EINA_TRUE;
}
E_API void
e_comp_x_randr_config_apply(void)
{
if (e_randr2_cfg->use_cmd)
{
if (use_xrandr == -1)
{
if (ecore_file_app_installed("xrandr")) use_xrandr = 1;
else use_xrandr = 0;
}
}
else use_xrandr = 0;
if (use_xrandr == 1) _e_comp_xrandr_cmd();
else _e_comp_xrandr_ecore_x();
}
E_API Eina_Bool
e_comp_x_randr_available(void)
{

View File

@ -750,6 +750,7 @@ _e_config_edd_init(Eina_Bool old)
E_CONFIG_VAL(D, T, winlist_list_size, DOUBLE); /**/
E_CONFIG_VAL(D, T, winlist_large_size, DOUBLE); /**/
E_CONFIG_VAL(D, T, winlist_list_no_miniatures, UCHAR); /**/
E_CONFIG_VAL(D, T, no_state_hidden_desktop, UCHAR); /**/
E_CONFIG_VAL(D, T, maximize_policy, INT); /**/
E_CONFIG_VAL(D, T, allow_manip, INT); /**/
E_CONFIG_VAL(D, T, border_fix_on_shelf_toggle, INT); /**/
@ -855,8 +856,10 @@ _e_config_edd_init(Eina_Bool old)
E_CONFIG_VAL(D, T, mouse_hand, INT);
E_CONFIG_VAL(D, T, mouse_accel, DOUBLE);
E_CONFIG_VAL(D, T, mouse_flat_accel, UCHAR);
E_CONFIG_VAL(D, T, mouse_accel_threshold, INT);
E_CONFIG_VAL(D, T, mouse_natural_scroll, UCHAR);
E_CONFIG_VAL(D, T, mouse_hires_scroll, UCHAR);
E_CONFIG_VAL(D, T, mouse_emulate_middle_button, UCHAR);
E_CONFIG_VAL(D, T, touch_accel, DOUBLE);
@ -864,6 +867,7 @@ _e_config_edd_init(Eina_Bool old)
E_CONFIG_VAL(D, T, touch_emulate_middle_button, UCHAR);
E_CONFIG_VAL(D, T, touch_tap_to_click, UCHAR);
E_CONFIG_VAL(D, T, touch_clickpad, UCHAR);
E_CONFIG_VAL(D, T, touch_flat_accel, UCHAR);
E_CONFIG_VAL(D, T, touch_scrolling_2finger, UCHAR);
E_CONFIG_VAL(D, T, touch_scrolling_edge, UCHAR);
E_CONFIG_VAL(D, T, touch_scrolling_circular, UCHAR);
@ -1801,6 +1805,14 @@ e_config_load(void)
e_config->backlight.ddc = 1;
e_config_save_queue();
}
CONFIG_VERSION_CHECK(36)
{
CONFIG_VERSION_UPDATE_INFO(36);
e_config->mouse_flat_accel = 0;
e_config->mouse_hires_scroll = 1;
e_config->touch_flat_accel = 0;
e_config_save_queue();
}
}
elm_config_profile_set(_e_config_profile);
if (!e_config->remember_internal_fm_windows)

View File

@ -135,6 +135,7 @@ struct _E_Config
double winlist_list_size; // GUI
double winlist_large_size; // GUI
Eina_Bool winlist_list_no_miniatures; // GUI
Eina_Bool no_state_hidden_desktop; // GUI
int maximize_policy; // GUI
int allow_manip; // GUI
int border_fix_on_shelf_toggle; // GUI
@ -245,12 +246,15 @@ struct _E_Config
int mouse_hand; //GUI
double mouse_accel; // GUI
int mouse_accel_threshold; // GUI
unsigned char mouse_flat_accel; // GUI
unsigned char mouse_natural_scroll; // GUI
unsigned char mouse_hires_scroll; // GUI
unsigned char mouse_emulate_middle_button; // GUI
double touch_accel; // GUI
unsigned char touch_natural_scroll; // GUI
unsigned char touch_emulate_middle_button; // GUI
unsigned char touch_flat_accel; // GUI
unsigned char touch_tap_to_click; // GUI
unsigned char touch_clickpad; // GUI
unsigned char touch_scrolling_2finger; // GUI

View File

@ -434,16 +434,13 @@ e_dbusmenu_item_unref(E_DBusMenu_Item *m)
E_API void
e_dbusmenu_unload(E_DBusMenu_Ctx *ctx)
{
Eldbus_Connection *conn;
Eldbus_Object *obj;
EINA_SAFETY_ON_NULL_RETURN(ctx);
if (ctx->root_menu) e_dbusmenu_item_unref(ctx->root_menu);
obj = eldbus_proxy_object_get(ctx->proxy);
conn = eldbus_object_connection_get(obj);
eldbus_proxy_unref(ctx->proxy);
eldbus_object_unref(obj);
eldbus_connection_unref(conn);
free(ctx);
}

View File

@ -124,7 +124,7 @@ e_desklock_interface_append(E_Desklock_Interface *iface)
desklock_ifaces = eina_list_append(desklock_ifaces, (void*)iface);
if (_e_desklock_state && (!current_iface))
{
if (iface->show())
if (iface->show(EINA_TRUE))
{
iface->active = EINA_TRUE;
current_iface = iface;
@ -155,7 +155,7 @@ e_desklock_interface_remove(E_Desklock_Interface *iface)
/* then try to find a replacement locker */
EINA_LIST_REVERSE_FOREACH(desklock_ifaces, l, diface)
{
if (!diface->show()) continue;
if (!diface->show(EINA_TRUE)) continue;
diface->active = EINA_TRUE;
current_iface = diface;
break;
@ -209,7 +209,7 @@ e_desklock_demo(void)
EINA_LIST_REVERSE_FOREACH(desklock_ifaces, l, iface)
{
if (iface->show())
if (iface->show(EINA_FALSE))
{
demo = iface->active = EINA_TRUE;
current_iface = iface;
@ -254,7 +254,7 @@ _desklock_show_internal(Eina_Bool suspend)
e_menu_hide_all();
EINA_LIST_FOREACH(show_hooks, l, show_cb)
{
if (!show_cb()) goto fail;
if (!show_cb(suspend)) goto fail;
}
EINA_LIST_FOREACH(e_comp->zones, l, zone)
@ -278,6 +278,28 @@ _desklock_show_internal(Eina_Bool suspend)
if (e_config->desklock_language)
e_intl_language_set(e_config->desklock_language);
if ((e_config->xkb.lock_layout) && (e_config->xkb.desklock_layout))
{
if ((!e_config->xkb.lock_layout->name) ||
(!!strcmp(e_config->xkb.lock_layout->name, e_config->xkb.desklock_layout)))
{
e_config_xkb_layout_free(e_config->xkb.lock_layout);
e_config->xkb.lock_layout = NULL;
}
}
if ((e_config->xkb.desklock_layout) && (!e_config->xkb.lock_layout))
{
E_Config_XKB_Layout *cl;
EINA_LIST_FOREACH(e_config->xkb.used_layouts, l, cl)
{
if ((cl->name) && (!strcmp(cl->name, e_config->xkb.desklock_layout)))
{
e_config->xkb.lock_layout = e_config_xkb_layout_dup(cl);
break;
}
}
}
if (e_config->xkb.lock_layout)
e_xkb_layout_set(e_config->xkb.lock_layout);
@ -295,7 +317,7 @@ _desklock_show_internal(Eina_Bool suspend)
EINA_LIST_REVERSE_FOREACH(desklock_ifaces, l, iface)
{
success = iface->show();
success = iface->show(suspend);
if (success)
{
iface->active = EINA_TRUE;
@ -507,8 +529,6 @@ _e_desklock_cb_run(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
E_Order *desk_run;
char buf[PATH_MAX];
if (!ev->suspend) return ECORE_CALLBACK_PASS_ON;
if (ev->on)
{
e_user_dir_concat_static(buf, "applications/desk-lock/.order");

View File

@ -1,7 +1,7 @@
#ifdef E_TYPEDEFS
typedef struct _E_Event_Desklock E_Event_Desklock;
typedef Eina_Bool (*E_Desklock_Show_Cb)(void);
typedef Eina_Bool (*E_Desklock_Show_Cb)(Eina_Bool immediate);
typedef void (*E_Desklock_Hide_Cb)(void);
typedef enum _E_Desklock_Background_Method {

View File

@ -13,6 +13,7 @@ static unsigned int _e_dpms_timeout_standby = 0;
static unsigned int _e_dpms_timeout_suspend = 0;
static unsigned int _e_dpms_timeout_off = 0;
static int _e_dpms_enabled = EINA_FALSE;
E_API Eina_Bool e_dpms_actual = EINA_FALSE;
#ifdef HAVE_WAYLAND
static Eina_List *handlers;
@ -21,10 +22,6 @@ static Ecore_Timer *suspend_timer;
static Ecore_Timer *off_timer;
#endif
#define STANDBY 10
#define SUSPEND 11
#define OFF 12
E_API void
e_dpms_update(void)
{
@ -35,6 +32,7 @@ e_dpms_update(void)
enabled = ((e_config->screensaver_enable) &&
(!((e_util_fullscreen_any()) &&
(e_config->no_dpms_on_fullscreen))));
if (e_screensaver_current_timeout_get() == 0) enabled = EINA_FALSE;
if (_e_dpms_enabled != enabled)
{
_e_dpms_enabled = enabled;
@ -42,9 +40,15 @@ e_dpms_update(void)
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
{
if (!e_config->screensaver_dpms_off)
ecore_x_dpms_enabled_set(enabled);
{
ecore_x_dpms_enabled_set(enabled);
e_dpms_actual = enabled;
}
else
ecore_x_dpms_enabled_set(0);
{
ecore_x_dpms_enabled_set(0);
e_dpms_actual = EINA_FALSE;
}
}
#endif
}
@ -53,9 +57,9 @@ e_dpms_update(void)
if (e_config->screensaver_enable)
{
off = suspend = standby = e_screensaver_timeout_get(EINA_FALSE);
standby += STANDBY;
suspend += SUSPEND;
off += OFF;
standby += E_DPMS_STANDBY;
suspend += E_DPMS_SUSPEND;
off += E_DPMS_OFF;
}
if (_e_dpms_timeout_standby != standby)
{
@ -87,13 +91,20 @@ e_dpms_force_update(void)
int enabled;
enabled = (e_config->screensaver_enable);
if (e_screensaver_current_timeout_get() == 0) enabled = EINA_FALSE;
#ifndef HAVE_WAYLAND_ONLY
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
{
if (!e_config->screensaver_dpms_off)
ecore_x_dpms_enabled_set(enabled);
{
ecore_x_dpms_enabled_set(enabled);
e_dpms_actual = enabled;
}
else
ecore_x_dpms_enabled_set(0);
{
ecore_x_dpms_enabled_set(0);
e_dpms_actual = EINA_FALSE;
}
}
#endif
if (!enabled) return;
@ -101,9 +112,9 @@ e_dpms_force_update(void)
if (e_config->screensaver_enable)
{
off = suspend = standby = e_screensaver_timeout_get(EINA_FALSE);
standby += STANDBY;
suspend += SUSPEND;
off += OFF;
standby += E_DPMS_STANDBY;
suspend += E_DPMS_SUSPEND;
off += E_DPMS_OFF;
}
#ifndef HAVE_WAYLAND_ONLY
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return;
@ -171,9 +182,9 @@ _e_dpms_off(void *d EINA_UNUSED)
static Eina_Bool
_e_dpms_screensaver_on()
{
standby_timer = ecore_timer_loop_add(STANDBY, _e_dpms_standby, NULL);
suspend_timer = ecore_timer_loop_add(SUSPEND, _e_dpms_suspend, NULL);
off_timer = ecore_timer_loop_add(OFF, _e_dpms_off, NULL);
standby_timer = ecore_timer_loop_add(E_DPMS_STANDBY, _e_dpms_standby, NULL);
suspend_timer = ecore_timer_loop_add(E_DPMS_SUSPEND, _e_dpms_suspend, NULL);
off_timer = ecore_timer_loop_add(E_DPMS_OFF, _e_dpms_off, NULL);
return ECORE_CALLBACK_RENEW;
}

View File

@ -3,11 +3,17 @@
#ifndef E_DPMS_H
#define E_DPMS_H
#define E_DPMS_STANDBY 10
#define E_DPMS_SUSPEND 11
#define E_DPMS_OFF 12
EINTERN int e_dpms_init(void);
EINTERN int e_dpms_shutdown(void);
E_API void e_dpms_update(void);
E_API void e_dpms_force_update(void);
E_API extern Eina_Bool e_dpms_actual;
#endif
#endif

View File

@ -599,6 +599,7 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
if (startup_id < 0) startup_id = 0;
}
if (++startup_id < 1) startup_id = 1;
e_exehist_startup_id_set(startup_id);
snprintf(buf, sizeof(buf), "E_START|%i", startup_id);
e_util_env_set("DESKTOP_STARTUP_ID", buf);

View File

@ -597,8 +597,11 @@ e_hints_window_state_set(E_Client *ec)
if (ec->netwm.state.skip_pager)
state[num++] = ECORE_X_WINDOW_STATE_SKIP_PAGER;
}
if (ec->netwm.state.hidden)
state[num++] = ECORE_X_WINDOW_STATE_HIDDEN;
if (!e_config->no_state_hidden_desktop)
{
if (ec->netwm.state.hidden)
state[num++] = ECORE_X_WINDOW_STATE_HIDDEN;
}
if (ec->netwm.state.fullscreen)
state[num++] = ECORE_X_WINDOW_STATE_FULLSCREEN;

16
src/bin/e_inc_terms.h Normal file
View File

@ -0,0 +1,16 @@
"terminology.desktop",
"xterm.desktop",
"rxvt.desktop",
"gnome-terminal.desktop",
"konsole.desktop",
"Alacritty.desktop",
"cool-retro-term.desktop",
"kitty.desktop",
"urxvt.desktop",
"terminator.desktop",
"termite.desktop",
"qterminal.desktop",
"xfce4-terminal.desktop",
"lxterminal.desktop",
"com.gexperts.Tilix.desktop",
"deepin-terminal.desktop",

View File

@ -28,6 +28,7 @@
#include "e_place.h"
#include "e_resist.h"
#include "e_startup.h"
#include "e_state.h"
#include "e_signals.h"
#include "e_xinerama.h"
#include "e_layout.h"
@ -155,6 +156,7 @@
#include "e_comp_x_randr.h"
#include "e_watchdog.h"
#include "e_gesture.h"
#include "e_sound.h"
#ifdef HAVE_WAYLAND
# include "e_comp_wl.h"

View File

@ -72,6 +72,7 @@ e_int_client_prop(E_Client *ec)
if (ec->border_prop_dialog) return;
dia = e_dialog_new(NULL, "E", "_window_props");
e_dialog_resizable_set(dia, 1);
e_object_del_attach_func_set(E_OBJECT(dia), _ec_cb_dialog_del);
_create_data(dia, ec);
@ -455,30 +456,30 @@ _ec_icccm_create(E_Dialog *dia, void *data EINA_UNUSED)
e_widget_toolbook_page_append(otb, NULL, _("General"), o, 1, 1, 1, 1, 0.5, 0.0);
o = e_widget_table_add(e_win_evas_win_get(evas), 0);
STR_ENTRY(_("Minimum Size"), 0, 6, icccm.min);
STR_ENTRY(_("Maximum Size"), 0, 7, icccm.max);
STR_ENTRY(_("Base Size"), 0, 8, icccm.base);
STR_ENTRY(_("Resize Steps"), 0, 9, icccm.step);
STR_ENTRY(_("Minimum Size"), 0, 0, icccm.min);
STR_ENTRY(_("Maximum Size"), 0, 1, icccm.max);
STR_ENTRY(_("Base Size"), 0, 2, icccm.base);
STR_ENTRY(_("Resize Steps"), 0, 3, icccm.step);
e_widget_toolbook_page_append(otb, NULL, _("Sizing"), o, 1, 1, 1, 1, 0.5, 0.0);
o = e_widget_table_add(e_win_evas_win_get(evas), 0);
STR_ENTRY(_("Aspect Ratio"), 2, 0, icccm.aspect);
STR_ENTRY(_("Initial State"), 2, 1, icccm.initial_state);
STR_ENTRY(_("State"), 2, 2, icccm.state);
STR_ENTRY(_("Window ID"), 2, 3, icccm.window_id);
STR_ENTRY(_("Window Group"), 2, 4, icccm.window_group);
STR_ENTRY(_("Transient For"), 2, 5, icccm.transient_for);
STR_ENTRY(_("Client Leader"), 2, 6, icccm.client_leader);
STR_ENTRY(_("Gravity"), 2, 7, icccm.gravity);
STR_ENTRY(_("Command"), 2, 8, icccm.command);
STR_ENTRY(_("Aspect Ratio"), 0, 0, icccm.aspect);
STR_ENTRY(_("Initial State"), 0, 1, icccm.initial_state);
STR_ENTRY(_("State"), 0, 2, icccm.state);
STR_ENTRY(_("Window ID"), 0, 3, icccm.window_id);
STR_ENTRY(_("Window Group"), 0, 4, icccm.window_group);
STR_ENTRY(_("Transient For"), 0, 5, icccm.transient_for);
STR_ENTRY(_("Client Leader"), 0, 6, icccm.client_leader);
STR_ENTRY(_("Gravity"), 0, 7, icccm.gravity);
STR_ENTRY(_("Command"), 0, 8, icccm.command);
e_widget_toolbook_page_append(otb, NULL, _("States"), o, 1, 1, 1, 1, 0.5, 0.0);
o = e_widget_table_add(e_win_evas_win_get(evas), 0);
CHK_ENTRY(_("Take Focus"), 0, 11, icccm.take_focus);
CHK_ENTRY(_("Accepts Focus"), 0, 12, icccm.accepts_focus);
CHK_ENTRY(_("Urgent"), 0, 13, icccm.urgent);
CHK_ENTRY(_("Request Delete"), 2, 11, icccm.delete_request);
CHK_ENTRY(_("Request Position"), 2, 12, icccm.request_pos);
CHK_ENTRY(_("Take Focus"), 0, 0, icccm.take_focus);
CHK_ENTRY(_("Accepts Focus"), 0, 1, icccm.accepts_focus);
CHK_ENTRY(_("Urgent"), 0, 2, icccm.urgent);
CHK_ENTRY(_("Request Delete"), 2, 0, icccm.delete_request);
CHK_ENTRY(_("Request Position"), 2, 1, icccm.request_pos);
e_widget_toolbook_page_append(otb, NULL, _("Settings"), o, 1, 1, 1, 1, 0.5, 0.0);
e_widget_toolbook_page_show(otb, 0);
@ -501,19 +502,19 @@ _ec_netwm_create(E_Dialog *dia, void *data EINA_UNUSED)
evas = evas_object_evas_get(dia->win);
otb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale);
o = e_widget_table_add(e_win_evas_win_get(evas), 0);
STR_ENTRY(_("Name"), 0, 1, netwm.name);
STR_ENTRY(_("Icon Name"), 0, 2, netwm.icon_name);
STR_ENTRY(_("Stacking"), 0, 3, netwm.stacking);
STR_ENTRY(_("Name"), 0, 0, netwm.name);
STR_ENTRY(_("Icon Name"), 0, 1, netwm.icon_name);
STR_ENTRY(_("Stacking"), 0, 2, netwm.stacking);
e_widget_toolbook_page_append(otb, NULL, _("General"), o, 1, 1, 1, 1, 0.5, 0.0);
o = e_widget_table_add(e_win_evas_win_get(evas), 0);
CHK_ENTRY(_("Modal"), 0, 4, netwm.modal);
CHK_ENTRY(_("Sticky"), 0, 5, netwm.sticky);
CHK_ENTRY(_("Shaded"), 0, 6, netwm.shaded);
CHK_ENTRY(_("Skip Taskbar"), 0, 7, netwm.skip_taskbar);
CHK_ENTRY(_("Skip Pager"), 0, 8, netwm.skip_pager);
CHK_ENTRY(_("Hidden"), 0, 9, netwm.hidden);
CHK_ENTRY(_("Fullscreen"), 0, 10, netwm.fullscreen);
CHK_ENTRY(_("Modal"), 0, 0, netwm.modal);
CHK_ENTRY(_("Sticky"), 0, 1, netwm.sticky);
CHK_ENTRY(_("Shaded"), 0, 2, netwm.shaded);
CHK_ENTRY(_("Skip Taskbar"), 2, 0, netwm.skip_taskbar);
CHK_ENTRY(_("Skip Pager"), 2, 1, netwm.skip_pager);
CHK_ENTRY(_("Hidden"), 2, 2, netwm.hidden);
CHK_ENTRY(_("Fullscreen"), 2, 3, netwm.fullscreen);
e_widget_toolbook_page_append(otb, NULL, _("Settings"), o, 1, 1, 1, 1, 0.5, 0.0);
e_widget_toolbook_page_show(otb, 0);

View File

@ -445,6 +445,7 @@ e_int_menus_inhibitors_new(void)
E_Menu_Item *mi;
Eina_List *l;
E_Msgbus_Data_Screensaver_Inhibit *inhibit;
char buf[1024];
m = e_menu_new();
if (!((e_msgbus_data) && (e_msgbus_data->screensaver_inhibits)))
@ -452,7 +453,15 @@ e_int_menus_inhibitors_new(void)
EINA_LIST_FOREACH(e_msgbus_data->screensaver_inhibits, l, inhibit)
{
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, inhibit->application);
if ((inhibit->application) && (inhibit->reason))
snprintf(buf, sizeof(buf), "%s (%s)", inhibit->application, inhibit->reason);
else if (inhibit->application)
snprintf(buf, sizeof(buf), "%s", inhibit->application);
else if (inhibit->reason)
snprintf(buf, sizeof(buf), "(%s)", inhibit->reason);
else
snprintf(buf, sizeof(buf), "???");
e_menu_item_label_set(mi, buf);
e_menu_item_check_set(mi, 1);
e_menu_item_toggle_set(mi, 1);
e_menu_item_callback_set(mi, _e_int_menus_inhibit_cb,

View File

@ -865,11 +865,7 @@ _e_intl_locale_system_locales_get(void)
locales = NULL;
/* FIXME: Maybe needed for other BSD OS, or even Solaris */
#ifdef __OpenBSD__
output = popen("ls /usr/share/locale", "r");
#else
output = popen("locale -a", "r");
#endif
if (output)
{
char line[32];

View File

@ -629,6 +629,7 @@ main(int argc, char **argv)
efreet_desktop_environment_set(e_config->desktop_environment);
e_util_env_set("E_ICON_THEME", e_config->icon_theme);
if (e_config->icon_theme) elm_config_icon_theme_set(e_config->icon_theme);
ecore_exe_run_priority_set(e_config->priority);
locked |= e_config->desklock_start_locked;
@ -698,6 +699,11 @@ main(int argc, char **argv)
TS("E_Ipc Init Done");
_e_main_shutdown_push(e_ipc_shutdown);
TS("E_State Init");
e_state_init();
TS("E_State Init Done");
_e_main_shutdown_push(e_state_shutdown);
TS("E_Font Init");
if (!e_font_init())
{
@ -800,6 +806,10 @@ main(int argc, char **argv)
TS("E_Powersave Init Done");
_e_main_shutdown_push(e_powersave_shutdown);
TS("E_Sound Init");
e_sound_init();
_e_main_shutdown_push(e_sound_shutdown);
TS("Screens Init");
if (!_e_main_screens_init())
{
@ -894,6 +904,7 @@ main(int argc, char **argv)
{
e_desklock_show_manual(EINA_TRUE);
e_screensaver_update();
e_dpms_force_update();
}
TS("Efreet Paths");
@ -1116,7 +1127,7 @@ main(int argc, char **argv)
E_LIST_FOREACH(e_comp->zones, e_comp_canvas_zone_restarted);
}
// e_watchdog_begin();
e_watchdog_begin();
TS("MAIN LOOP AT LAST");
if (!setjmp(x_fatal_buff))
{
@ -1125,7 +1136,7 @@ main(int argc, char **argv)
}
else
CRI("FATAL: X Died. Connection gone. Abbreviated Shutdown\n");
// e_watchdog_end();
e_watchdog_end();
e_main_loop_running = EINA_FALSE;
inloop = EINA_FALSE;

View File

@ -2,7 +2,7 @@
///////////////////////////////////////////////////////////////////////////
#define E_BUS "org.enlightenment.wm.service"
#define E_IFACE "org.enlightenment.wm.service"
#define E_IFACE "org.enlightenment.wm.Core"
#define E_PATH "/org/enlightenment/wm/RemoteObject"
static void _e_msgbus_core_request_name_cb(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending);
static Eldbus_Message *_e_msgbus_core_version_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
@ -26,6 +26,7 @@ static const Eldbus_Service_Interface_Desc _e_core_desc = {
#define SCREENSAVER_BUS "org.freedesktop.ScreenSaver"
#define SCREENSAVER_IFACE "org.freedesktop.ScreenSaver"
#define SCREENSAVER_PATH "/org/freedesktop/ScreenSaver"
#define SCREENSAVER_PATH2 "/ScreenSaver"
static void _e_msgbus_screensaver_request_name_cb(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending);
static void _e_msgbus_screensaver_inhibit_free(E_Msgbus_Data_Screensaver_Inhibit *inhibit);
static void _e_msgbus_screensaver_owner_change_cb(void *data EINA_UNUSED, const char *bus, const char *old_id, const char *new_id);
@ -69,6 +70,8 @@ e_msgbus_init(void)
e_msgbus_data->screensaver_iface = eldbus_service_interface_register
(e_msgbus_data->conn, SCREENSAVER_PATH, &_screensaver_core_desc);
e_msgbus_data->screensaver_iface2 = eldbus_service_interface_register
(e_msgbus_data->conn, SCREENSAVER_PATH2, &_screensaver_core_desc);
eldbus_name_request(e_msgbus_data->conn, SCREENSAVER_BUS, 0,
_e_msgbus_screensaver_request_name_cb, NULL);
return 1;
@ -79,6 +82,10 @@ e_msgbus_shutdown(void)
{
E_Msgbus_Data_Screensaver_Inhibit *inhibit;
if (e_msgbus_data->screensaver_iface2)
eldbus_service_object_unregister(e_msgbus_data->screensaver_iface2);
if (e_msgbus_data->screensaver_iface)
eldbus_service_object_unregister(e_msgbus_data->screensaver_iface);
if (e_msgbus_data->e_iface)
eldbus_service_object_unregister(e_msgbus_data->e_iface);
if (e_msgbus_data->conn)
@ -222,6 +229,7 @@ _e_msgbus_screensaver_owner_change_cb(void *data EINA_UNUSED, const char *bus EI
{
// stop inhibiting SS
e_screensaver_update();
e_dpms_force_update();
}
}
}
@ -267,6 +275,7 @@ _e_msgbus_screensaver_inhibit_cb(const Eldbus_Service_Interface *iface EINA_UNUS
// start inhibiting SS
e_screensaver_deactivate();
e_screensaver_update();
e_dpms_force_update();
}
err:
return reply;
@ -320,6 +329,7 @@ e_msgbus_screensaver_inhibit_remove(unsigned int cookie)
{
// stop inhibiting SS
e_screensaver_update();
e_dpms_force_update();
}
}

View File

@ -14,6 +14,7 @@ struct _E_Msgbus_Data
Eldbus_Connection *conn;
Eldbus_Service_Interface *e_iface;
Eldbus_Service_Interface *screensaver_iface;
Eldbus_Service_Interface *screensaver_iface2;
Eina_List *screensaver_inhibits;
};

View File

@ -2,8 +2,8 @@
typedef struct _Notification_Data
{
Eldbus_Connection *conn;
Eldbus_Service_Interface *iface;
Eldbus_Connection *conn;
Eldbus_Service_Interface *iface;
E_Notification_Notify_Cb notify_cb;
E_Notification_Close_Cb close_cb;
void *data;
@ -15,15 +15,28 @@ static Notification_Data *n_data = NULL;
static void
_notification_free(E_Notification_Notify *notify)
{
int i;
EINA_SAFETY_ON_NULL_RETURN(notify);
eina_stringshare_del(notify->app_name);
eina_stringshare_del(notify->body);
eina_stringshare_del(notify->icon.icon);
if (notify->icon.icon_path)
eina_stringshare_del(notify->icon.icon_path);
eina_stringshare_del(notify->summary);
if (notify->icon.raw.data)
free(notify->icon.raw.data);
if (notify->app_name) eina_stringshare_del(notify->app_name);
if (notify->body) eina_stringshare_del(notify->body);
if (notify->icon.icon) eina_stringshare_del(notify->icon.icon);
if (notify->icon.icon_path) eina_stringshare_del(notify->icon.icon_path);
if (notify->summary) eina_stringshare_del(notify->summary);
if (notify->icon.raw.data) free(notify->icon.raw.data);
if (notify->category) eina_stringshare_del(notify->category);
if (notify->desktop_entry) eina_stringshare_del(notify->desktop_entry);
if (notify->sound_file) eina_stringshare_del(notify->sound_file);
if (notify->sound_name) eina_stringshare_del(notify->sound_name);
if (notify->actions)
{
for (i = 0; notify->actions[i].action; i++)
{
eina_stringshare_del(notify->actions[i].action);
eina_stringshare_del(notify->actions[i].label);
}
free(notify->actions);
}
free(notify);
}
@ -31,12 +44,15 @@ static void
hints_dict_iter(void *data, const void *key, Eldbus_Message_Iter *var)
{
E_Notification_Notify *n = data;
if (!strcmp(key, "image-data") || !strcmp(key, "image_data"))
if ((!strcmp(key, "image-data")) || (!strcmp(key, "image_data")) ||
(!strcmp(key, "icon_data")))
{
Eldbus_Message_Iter *st, *data_iter;
int w, h, r, bits, channels;
Eina_Bool alpha;
unsigned char *raw_data;
if (!eldbus_message_iter_arguments_get(var, "(iiibiiay)", &st))
return;
if (!eldbus_message_iter_arguments_get(st, "iiibiiay", &w, &h, &r,
@ -54,173 +70,318 @@ hints_dict_iter(void *data, const void *key, Eldbus_Message_Iter *var)
n->icon.raw.data = malloc(sizeof(char) * n->icon.raw.data_size);
EINA_SAFETY_ON_NULL_RETURN(n->icon.raw.data);
memcpy(n->icon.raw.data, raw_data, sizeof(char) * n->icon.raw.data_size);
}
else if (!strcmp(key, "urgency"))
{
unsigned char urgency;
eldbus_message_iter_arguments_get(var, "y", &urgency);
if (urgency < 3)
n->urgency = urgency;
printf("NOT: image-data=%ix%i,a=%i\n", w, h, alpha);
}
else if (!strcmp(key, "image-path") || !strcmp(key, "image_path"))
{
eldbus_message_iter_arguments_get(var, "s", &n->icon.icon_path);
n->icon.icon_path = eina_stringshare_add(n->icon.icon_path);
printf("NOT: image-path=[%s]\n", n->icon.icon_path);
// path to image file
}
else if (!strcmp(key, "urgency"))
{
unsigned char urgency;
eldbus_message_iter_arguments_get(var, "y", &urgency);
if (urgency < 3) n->urgency = urgency;
printf("NOT: urgency=%i\n", n->urgency);
// 0=low, 1=normal, 2=critical
}
else if (!strcmp(key, "category"))
{ // XXX: store category
const char *val = NULL;
eldbus_message_iter_arguments_get(var, "s", &val);
printf("NOT: category=[%s]\n", val);
// "device" A generic device-related notification that doesn't fit into any other category.
// "device.added" A device, such as a USB device, was added to the system.
// "device.error" A device had some kind of error.
// "device.removed" A device, such as a USB device, was removed from the system.
// "email" A generic e-mail-related notification that doesn't fit into any other category.
// "email.arrived" A new e-mail notification.
// "email.bounced" A notification stating that an e-mail has bounced.
// "im" A generic instant message-related notification that doesn't fit into any other category.
// "im.error" An instant message error notification.
// "im.received" A received instant message notification.
// "network" A generic network notification that doesn't fit into any other category.
// "network.connected" A network connection notification, such as successful sign-on to a network service. This should not be confused with device.added for new network devices.
// "network.disconnected" A network disconnected notification. This should not be confused with device.removed for disconnected network devices.
// "network.error" A network-related or connection-related error.
// "presence" A generic presence change notification that doesn't fit into any other category, such as going away or idle.
// "presence.offline" An offline presence change notification.
// "presence.online" An online presence change notification.
// "transfer" A generic file transfer or download notification that doesn't fit into any other category.
// "transfer.complete" A file transfer or download complete notification.
// "transfer.error" A file transfer or download error.
if (val) n->category = eina_stringshare_add(val);
}
else if (!strcmp(key, "desktop-entry"))
{
const char *val = NULL;
eldbus_message_iter_arguments_get(var, "s", &val);
printf("NOT: desktop-entry=[%s]\n", val);
// if rage.desktop -> "rage"
// if terminology.desktop -> "terminology"
if (val) n->desktop_entry = eina_stringshare_add(val);
}
else if (!strcmp(key, "icon-actions"))
{
Eina_Bool val = 0;
eldbus_message_iter_arguments_get(var, "b", &val);
printf("NOT: icon-actions=%i\n", val);
// 1 == interpret action identifier == named icon in icon naming standards
n->icon_actions = val;
}
else if (!strcmp(key, "resident"))
{
Eina_Bool val = 0;
eldbus_message_iter_arguments_get(var, "b", &val);
printf("NOT: resident=%i\n", val);
// 1== remove notification when action invoked - no timeout
n->resident = val;
}
else if (!strcmp(key, "suppress-sound"))
{
Eina_Bool val = 0;
eldbus_message_iter_arguments_get(var, "b", &val);
printf("NOT: suppress-sound=%i\n", val);
// 1== remove notification when action invoked - no timeout
n->suppress_sound = val;
}
else if (!strcmp(key, "sound-file"))
{
const char *val = NULL;
eldbus_message_iter_arguments_get(var, "s", &val);
printf("NOT: sound-file=[%s]\n", val);
// path to sound file to play
if (val) n->sound_file = eina_stringshare_add(val);
}
else if (!strcmp(key, "sound-name"))
{
const char *val = NULL;
eldbus_message_iter_arguments_get(var, "s", &val);
printf("NOT: sound-file=[%s]\n", val);
// sound naming spec to play
// http://0pointer.de/public/sound-naming-spec.html
if (val) n->sound_name = eina_stringshare_add(val);
}
else if (!strcmp(key, "transient"))
{
Eina_Bool val = 0;
eldbus_message_iter_arguments_get(var, "b", &val);
printf("NOT: transient=%i\n", val);
n->transient = val;
}
else if (!strcmp(key, "x"))
{
int val = 0;
eldbus_message_iter_arguments_get(var, "i", &val);
printf("NOT: x=%i\n", val);
n->x = val;
n->have_xy = EINA_TRUE;
}
else if (!strcmp(key, "y"))
{
int val = 0;
eldbus_message_iter_arguments_get(var, "i", &val);
printf("NOT: y=%i\n", val);
n->y = val;
n->have_xy = EINA_TRUE;
}
}
/* this function should be external in edje for use in cases such as this module.
*
* happily, it was decided that the function would not be external so that it could
* be duplicated into the module in full.
*/
static int
_text_escape(Eina_Strbuf *txt, const char *text)
_tag_len(const char *txt)
{
const char *escaped;
int advance;
const char *s;
Eina_Bool backslash = EINA_FALSE;
Eina_Bool inquote = EINA_FALSE, indblquote = EINA_FALSE;
escaped = evas_textblock_string_escape_get(text, &advance);
if (!escaped)
if (txt[0] != '<') return 0;
for (s = txt; *s; s++)
{
eina_strbuf_append_char(txt, text[0]);
advance = 1;
if (!backslash)
{
if (*s == '\\') backslash = EINA_TRUE;
else
{
if (inquote)
{
if (*s == '\'') inquote = EINA_FALSE;
}
else if (indblquote)
{
if (*s == '"') indblquote = EINA_FALSE;
}
else
{
if (*s == '>')
{
s++;
break;
}
else if (*s == '\'') inquote = EINA_TRUE;
else if (*s == '\"') indblquote = EINA_TRUE;
}
}
}
else backslash = EINA_FALSE;
}
else
eina_strbuf_append(txt, escaped);
return advance;
return s - txt;
}
/* hardcoded list of allowed tags based on
* https://people.gnome.org/~mccann/docs/notification-spec/notification-spec-latest.html#markup
*/
static const char *tags[] =
static char *
_path_get(const char *txt)
{
"<b",
"<i",
"<u",
//"<a", FIXME: we can't actually display these right now
//"<img",
};
Eina_Strbuf *buf;
char *ret;
const char *s;
Eina_Bool backslash = EINA_FALSE;
Eina_Bool inquote = EINA_FALSE, indblquote = EINA_FALSE;
static const char *
_get_tag(const char *c)
{
unsigned int i;
if (txt[0] == '>') return NULL;
if (c[1] != '>') return NULL;
for (i = 0; i < EINA_C_ARRAY_LENGTH(tags); i++)
if (tags[i][1] == c[0]) return tags[i];
return NULL;
buf = eina_strbuf_new();
if (!buf) return NULL;
for (s = txt; *s; s++)
{
if (!backslash)
{
if (*s == '\\') backslash = EINA_TRUE;
else
{
if (inquote)
{
if (*s == '\'') inquote = EINA_FALSE;
else eina_strbuf_append_char(buf, *s);
}
else if (indblquote)
{
if (*s == '"') indblquote = EINA_FALSE;
else eina_strbuf_append_char(buf, *s);
}
else
{
if (*s == '>') break;
else if (*s == ' ') break;
else if (*s == '\'') inquote = EINA_TRUE;
else if (*s == '\"') indblquote = EINA_TRUE;
else eina_strbuf_append_char(buf, *s);
}
}
}
else
{
eina_strbuf_append_char(buf, *s);
backslash = EINA_FALSE;
}
}
ret = eina_strbuf_string_steal(buf);
eina_strbuf_free(buf);
return ret;
}
char *
static char *
_nedje_text_escape(const char *text)
{
Eina_Strbuf *txt;
char *ret;
const char *text_end;
size_t text_len;
Eina_Array *arr;
const char *cur_tag = NULL;
int taglen;
if (!text) return NULL;
txt = eina_strbuf_new();
text_len = strlen(text);
arr = eina_array_new(3);
if (!txt) return NULL;
text_end = text + strlen(text);
text_end = text + text_len;
while (text < text_end)
{
int advance;
if ((text[0] == '<') && text[1])
taglen = _tag_len(text);
if (taglen == 0)
{
const char *tag, *popped;
Eina_Bool closing = EINA_FALSE;
if (text[1] == '/') //closing tag
{
closing = EINA_TRUE;
tag = _get_tag(text + 2);
}
else
tag = _get_tag(text + 1);
if (closing)
{
if (cur_tag && (tag != cur_tag))
{
/* tag mismatch: autoclose all failure tags
* not technically required by the spec,
* but it makes me feel better about myself
*/
do
{
popped = eina_array_pop(arr);
if (eina_array_count(arr))
cur_tag = eina_array_data_get(arr, eina_array_count(arr) - 1);
else
cur_tag = NULL;
eina_strbuf_append_printf(txt, "</%c>", popped[1]);
} while (cur_tag && (popped != tag));
advance = 4;
}
else if (cur_tag)
{
/* tag match: just pop */
popped = eina_array_pop(arr);
if (eina_array_count(arr))
cur_tag = eina_array_data_get(arr, eina_array_count(arr) - 1);
else
cur_tag = NULL;
eina_strbuf_append_printf(txt, "</%c>", popped[1]);
advance = 4;
}
else
{
/* no current tag: escape */
advance = _text_escape(txt, text);
}
}
else
{
if (tag)
{
cur_tag = tag;
eina_array_push(arr, tag);
eina_strbuf_append_printf(txt, "<%c>", tag[1]);
advance = 3;
}
else
advance = _text_escape(txt, text);
}
}
else if (text[0] == '&')
{
const char *s;
s = strchr(text, ';');
if (s)
s = evas_textblock_escape_string_range_get(text, s + 1);
if (s)
{
eina_strbuf_append_char(txt, text[0]);
advance = 1;
}
else
advance = _text_escape(txt, text);
eina_strbuf_append_char(txt, text[0]);
text++;
}
else
advance = _text_escape(txt, text);
{
if (!strncmp(text, "<b>", 3)) eina_strbuf_append(txt, "<b>");
else if (!strncmp(text, "</b>", 4)) eina_strbuf_append(txt, "</b>");
else if (!strncmp(text, "<i>", 3)) eina_strbuf_append(txt, "<i>");
else if (!strncmp(text, "</i>", 4)) eina_strbuf_append(txt, "</i>");
else if (!strncmp(text, "<u>", 3)) eina_strbuf_append(txt, "<u>");
else if (!strncmp(text, "</u>", 4)) eina_strbuf_append(txt, "</u>");
else if (!strncmp(text, "<a ", 3))
{
eina_strbuf_append(txt, "<link>");
eina_strbuf_append_n(txt, text, taglen);
}
else if (!strncmp(text, "</a>", 3))
{
eina_strbuf_append(txt, "</a></link>");
}
else if (!strncmp(text, "<img src=", 9))
{
Evas_Object *o;
int w = 0, h = 0;
char *path;
text += advance;
path = _path_get(text + 9);
if ((path) && (strlen(path) > 0))
{
o = evas_object_image_add(e_comp->evas);
evas_object_image_file_set(o, path, NULL);
evas_object_image_size_get(o, &w, &h);
printf("NOT: imgpath=%s %ix%i\n", path, w, h);
if ((w > 0) && (h > 0))
{
double neww = w, newh = h;
if (neww > 200.0)
{
double oldw = neww;
neww = 200.0;
newh = (newh * neww) / oldw;
}
if (newh > 100.0)
{
double oldh = newh;
newh = 100.0;
neww = (neww * newh) / oldh;
}
neww *= e_scale;
newh *= e_scale;
w = neww + 0.5;
h = newh + 0.5;
eina_strbuf_append_printf
(txt, "<item absize=%ix%i href=", w, h);
eina_strbuf_append_n(txt, text + 9, taglen - 9);
eina_strbuf_append(txt, "</item>");
}
evas_object_del(o);
}
free(path);
}
text += taglen;
}
}
eina_array_free(arr);
ret = eina_strbuf_string_steal(txt);
printf("NOT: body -> [%s]\n", ret);
eina_strbuf_free(txt);
return ret;
}
@ -231,28 +392,30 @@ notify_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Messag
E_Notification_Notify *n;
Eldbus_Message_Iter *actions_iter, *hints_iter;
Eldbus_Message *reply;
char *txt;
char *txt, *txt2;
int num;
if (!n_data->notify_cb)
return NULL;
if (!n_data->notify_cb) return NULL;
n = E_OBJECT_ALLOC(E_Notification_Notify, E_NOTIFICATION_TYPE, _notification_free);
n->urgency = E_NOTIFICATION_NOTIFY_URGENCY_NORMAL;
if (!eldbus_message_arguments_get(msg, "susssasa{sv}i", &n->app_name,
&n->replaces_id, &n->icon.icon, &n->summary,
&n->body, &actions_iter, &hints_iter,
&n->timeout))
if (!eldbus_message_arguments_get(msg, "susssasa{sv}i",
&n->app_name, &n->replaces_id,
&n->icon.icon, &n->summary, &n->body,
&actions_iter, &hints_iter, &n->timeout))
{
ERR("Reading message.");
e_object_del(E_OBJECT(n));
return NULL;
}
if (e_screensaver_on_get() && e_config->screensaver_wake_on_notify)
{
{ // XXX: this is an attempt to wake the screen? should be an option
int x, y;
ecore_evas_pointer_xy_get(e_comp->ee, &x, &y);
ecore_evas_pointer_warp(e_comp->ee, x, y);
}
// walk hints
eldbus_message_iter_dict_iterate(hints_iter, "sv", hints_dict_iter, n);
n->app_name = eina_stringshare_add(n->app_name);
n->icon.icon = eina_stringshare_add(n->icon.icon);
@ -261,22 +424,44 @@ notify_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Messag
n->body = eina_stringshare_add(txt);
free(txt);
num = 0;
while (eldbus_message_iter_get_and_next(actions_iter, 's', &txt))
{
if (eldbus_message_iter_get_and_next(actions_iter, 's', &txt2))
{ // XXX: add actions to notification
E_Notification_Notify_Action *actions;
printf("NOT: act=[%s] [%s]\n", txt, txt2);
num++;
actions = realloc(n->actions, (num + 1) *
sizeof(E_Notification_Notify_Action));
if (actions)
{
n->actions = actions;
n->actions[num - 1].action = eina_stringshare_add(txt);
n->actions[num - 1].label = eina_stringshare_add(txt2);
n->actions[num].action = NULL;
n->actions[num].label = NULL;
}
}
}
e_object_ref(E_OBJECT(n));
n->id = n_data->notify_cb(n_data->data, n);
reply = eldbus_message_method_return_new(msg);
eldbus_message_arguments_append(reply, "u", n->id);
e_object_unref(E_OBJECT(n));
return reply;
}
static Eldbus_Message *
close_notification_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
{
unsigned id;
if (!eldbus_message_arguments_get(msg, "u", &id))
return NULL;
if (n_data->close_cb)
n_data->close_cb(n_data->data, id);
unsigned int id;
if (!eldbus_message_arguments_get(msg, "u", &id)) return NULL;
if (n_data->close_cb) n_data->close_cb(n_data->data, id);
return eldbus_message_method_return_new(msg);
}
@ -291,8 +476,10 @@ capabilities_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_
eldbus_message_iter_arguments_append(main_iter, "as", &array);
for (i = 0; n_data->server_info->capabilities[i]; i++)
eldbus_message_iter_arguments_append(array, "s",
n_data->server_info->capabilities[i]);
{
eldbus_message_iter_arguments_append
(array, "s", n_data->server_info->capabilities[i]);
}
eldbus_message_iter_container_close(main_iter, array);
return reply;
}
@ -301,23 +488,32 @@ static Eldbus_Message *
server_info_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
{
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
eldbus_message_arguments_append(reply, "ssss", n_data->server_info->name,
n_data->server_info->vendor,
n_data->server_info->version,
n_data->server_info->spec_version);
eldbus_message_arguments_append(reply, "ssss",
n_data->server_info->name,
n_data->server_info->vendor,
n_data->server_info->version,
n_data->server_info->spec_version);
return reply;
}
static const Eldbus_Method methods[] = {
{ "Notify",
ELDBUS_ARGS({"s", "app_name"}, {"u", "replaces_id"}, {"s", "app_icon"}, {"s", "summary"}, {"s", "body"}, {"as", "actions"}, {"a{sv}", "hints"}, {"i", "expire_timeout"}),
ELDBUS_ARGS({"u", "id"}), notify_cb, 0 },
{ "CloseNotification", ELDBUS_ARGS({"u", "id"}), NULL, close_notification_cb, 0 },
{ "GetCapabilities", NULL, ELDBUS_ARGS({"as", "capabilities"}),
capabilities_cb, 0 },
{ "GetServerInformation", NULL,
ELDBUS_ARGS({"s", "name"}, {"s", "vendor"}, {"s", "version"}, {"s", "spec_version"}),
server_info_cb, 0 },
ELDBUS_ARGS({"s", "app_name"}, {"u", "replaces_id"}, {"s", "app_icon"}, {"s", "summary"}, {"s", "body"}, {"as", "actions"}, {"a{sv}", "hints"}, {"i", "expire_timeout"}),
ELDBUS_ARGS({"u", "id"}),
notify_cb, 0 },
{ "CloseNotification",
ELDBUS_ARGS({"u", "id"}),
NULL,
close_notification_cb, 0 },
{ "GetCapabilities",
NULL,
ELDBUS_ARGS({"as", "capabilities"}),
capabilities_cb, 0 },
{ "GetServerInformation",
NULL,
ELDBUS_ARGS({"s", "name"}, {"s", "vendor"}, {"s", "version"}, {"s", "spec_version"}),
server_info_cb, 0 },
{ NULL, NULL, NULL, NULL, 0 }
};
@ -332,6 +528,7 @@ static const Eldbus_Signal signals[] = {
{ "NotificationClosed", ELDBUS_ARGS({"u", "id"}, {"u", "reason"}), 0 },
[SIGNAL_ACTION_INVOKED] =
{ "ActionInvoked", ELDBUS_ARGS({"u", "id"}, {"s", "action_key"}), 0 },
{ NULL, NULL, 0}
};
@ -347,8 +544,8 @@ E_API Eina_Bool
e_notification_server_register(const E_Notification_Server_Info *server_info, E_Notification_Notify_Cb n_cb, E_Notification_Close_Cb close_cb, const void *data)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(server_info, EINA_FALSE);
if (n_data)
return EINA_FALSE;
if (n_data) return EINA_FALSE;
n_data = calloc(1, sizeof(Notification_Data));
EINA_SAFETY_ON_NULL_RETURN_VAL(n_data, EINA_FALSE);
@ -359,8 +556,7 @@ e_notification_server_register(const E_Notification_Server_Info *server_info, E_
n_data->data = (void *)data;
n_data->server_info = server_info;
eldbus_name_request(n_data->conn, BUS,
ELDBUS_NAME_REQUEST_FLAG_REPLACE_EXISTING, NULL, NULL);
ELDBUS_NAME_REQUEST_FLAG_REPLACE_EXISTING, NULL, NULL);
return EINA_TRUE;
}
@ -381,7 +577,17 @@ e_notification_notify_close(E_Notification_Notify *notify, E_Notification_Notify
EINA_SAFETY_ON_NULL_RETURN(notify);
EINA_SAFETY_ON_FALSE_RETURN(reason <= E_NOTIFICATION_NOTIFY_CLOSED_REASON_UNDEFINED);
eldbus_service_signal_emit(n_data->iface, SIGNAL_NOTIFICATION_CLOSED,
notify->id, reason);
notify->id, reason);
}
E_API void
e_notification_notify_action(E_Notification_Notify *notify, const char *action)
{
EINA_SAFETY_ON_NULL_RETURN(n_data);
EINA_SAFETY_ON_NULL_RETURN(notify);
if (!action) action = "";
eldbus_service_signal_emit(n_data->iface, SIGNAL_ACTION_INVOKED,
notify->id, action);
}
E_API Evas_Object *
@ -491,6 +697,7 @@ notification_client_dbus_send(E_Notification_Notify *notify, E_Notification_Clie
{
Eldbus_Message_Iter *st, *data_iter;
int i;
eldbus_message_iter_arguments_append(hints, "{sv}", &entry);
eldbus_message_iter_arguments_append(entry, "s", "image-data");
var = eldbus_message_iter_container_new(entry, 'v', "(iiibiiay)");
@ -533,8 +740,7 @@ notification_client_dbus_send(E_Notification_Notify *notify, E_Notification_Clie
p = eldbus_connection_send(conn, msg, client_notify_cb, data, 5000);
EINA_SAFETY_ON_NULL_GOTO(p, error);
if (cb)
eldbus_pending_data_set(p, "cb", cb);
if (cb) eldbus_pending_data_set(p, "cb", cb);
eldbus_pending_data_set(p, "conn", conn);
return EINA_TRUE;
@ -547,8 +753,7 @@ error:
static void
normalize_notify(E_Notification_Notify *notify)
{
if (!notify->timeout)
notify->timeout = -1;
if (!notify->timeout) notify->timeout = -1;
}
E_API Eina_Bool
@ -562,11 +767,12 @@ e_notification_client_send(E_Notification_Notify *notify, E_Notification_Client_
if (!n_data)
{
fprintf(stderr, "UNHANDLED NOTIFICATION:\nSummary: %s\nBody: %s\n", notify->summary, notify->body);
fprintf(stderr, "UNHANDLED NOTIFICATION:\nSummary: %s\nBody: %s\n",
notify->summary, notify->body);
return notification_client_dbus_send(notify, cb, data);
}
//local
// local
copy = malloc(sizeof(E_Notification_Notify));
EINA_SAFETY_ON_NULL_RETURN_VAL(copy, EINA_FALSE);
memcpy(copy, notify, sizeof(E_Notification_Notify));
@ -579,8 +785,7 @@ e_notification_client_send(E_Notification_Notify *notify, E_Notification_Client_
copy->icon.icon_path = eina_stringshare_add(notify->icon.icon_path);
id = n_data->notify_cb(n_data->data, copy);
if (cb)
cb((void *)data, id);
if (cb) cb((void *)data, id);
return EINA_TRUE;
}

View File

@ -7,35 +7,39 @@
typedef enum _E_Notification_Notify_Urgency
{
E_NOTIFICATION_NOTIFY_URGENCY_LOW,
E_NOTIFICATION_NOTIFY_URGENCY_NORMAL,
E_NOTIFICATION_NOTIFY_URGENCY_CRITICAL
E_NOTIFICATION_NOTIFY_URGENCY_LOW = 0,
E_NOTIFICATION_NOTIFY_URGENCY_NORMAL = 1,
E_NOTIFICATION_NOTIFY_URGENCY_CRITICAL = 2
} E_Notification_Notify_Urgency;
typedef enum _E_Notification_Notify_Closed_Reason
{
E_NOTIFICATION_NOTIFY_CLOSED_REASON_EXPIRED, /** The notification expired. */
E_NOTIFICATION_NOTIFY_CLOSED_REASON_DISMISSED, /** The notification was dismissed by the user. */
E_NOTIFICATION_NOTIFY_CLOSED_REASON_REQUESTED, /** The notification was closed by a call to CloseNotification method. */
E_NOTIFICATION_NOTIFY_CLOSED_REASON_UNDEFINED /** Undefined/reserved reasons. */
E_NOTIFICATION_NOTIFY_CLOSED_REASON_EXPIRED = 1,
E_NOTIFICATION_NOTIFY_CLOSED_REASON_DISMISSED = 2,
E_NOTIFICATION_NOTIFY_CLOSED_REASON_REQUESTED = 3,
E_NOTIFICATION_NOTIFY_CLOSED_REASON_UNDEFINED = 4
} E_Notification_Notify_Closed_Reason;
typedef struct _E_Notification_Notify_Action
{
const char *action;
const char *label;
} E_Notification_Notify_Action;
typedef struct _E_Notification_Notify
{
E_Object e_obj_inherit;
unsigned int id;
const char *app_name;
unsigned replaces_id;
unsigned int replaces_id;
const char *summary;
const char *body;
int timeout;
int timeout; // time in ms
E_Notification_Notify_Urgency urgency;
struct
{
struct {
const char *icon;
const char *icon_path;
struct
{
struct {
int width;
int height;
int rowstride;
@ -46,6 +50,17 @@ typedef struct _E_Notification_Notify
int data_size;
} raw;
} icon;
const char *category;
const char *desktop_entry;
const char *sound_file;
const char *sound_name;
int x, y;
Eina_Bool have_xy;
Eina_Bool icon_actions;
Eina_Bool resident;
Eina_Bool suppress_sound;
Eina_Bool transient;
E_Notification_Notify_Action *actions;
} E_Notification_Notify;
typedef unsigned int (*E_Notification_Notify_Cb)(void *data, E_Notification_Notify *n);
@ -80,7 +95,9 @@ E_API Evas_Object *e_notification_notify_raw_image_get(E_Notification_Notify *no
//client
typedef void (*E_Notification_Client_Send_Cb)(void *data, unsigned int id);
E_API Eina_Bool e_notification_client_send(E_Notification_Notify *notify, E_Notification_Client_Send_Cb cb, const void *data);
E_API void e_notification_notify_action(E_Notification_Notify *notify, const char *action);
E_API Eina_Bool e_notification_util_send(const char *summary, const char *body);
#endif

View File

@ -391,26 +391,17 @@ _e_pointer_cb_free(E_Pointer *ptr)
free(ptr);
}
/*
* Fallback to x11 setting the correct cursor and shape.
*
* Not rendering any application rendered canvas, only works for x11 compositors
*/
static void
_e_pointer_x11_setup(E_Pointer *ptr, const char *cursor)
_e_pointer_x11_fallback_to_x11_pointer(E_Pointer *ptr)
{
if (ptr->e_cursor && (e_comp->comp_type != E_PIXMAP_TYPE_WL))
{
/* create a pointer canvas if we need to */
if ((!ptr->buffer_evas) && ptr->win) _e_pointer_canvas_add(ptr);
if (ptr->buffer_o_ptr && (ptr->buffer_o_ptr != ptr->o_ptr))
{
e_theme_edje_object_set(ptr->buffer_o_ptr, "base/theme/pointer", cursor);
edje_object_part_swallow(ptr->buffer_o_ptr, "e.swallow.hotspot", ptr->buffer_o_hot);
if (!init)
{
edje_object_signal_emit(ptr->o_ptr, "e,state,init", "e");
edje_object_message_signal_process(ptr->o_ptr);
init = EINA_TRUE;
}
}
return;
}
EINA_SAFETY_ON_FALSE_RETURN((e_comp->comp_type != E_PIXMAP_TYPE_WL));
// Remove any application rendered pointer canvas, x11 is going to render
if (ptr->buffer_evas) _e_pointer_canvas_del(ptr);
#ifndef HAVE_WAYLAND_ONLY
if (!e_comp_util_has_x()) return;
@ -459,6 +450,43 @@ _e_pointer_x11_setup(E_Pointer *ptr, const char *cursor)
#endif
}
static Eina_Bool
_e_pointer_theme_object_setup(Evas_Object *edje, const char *cursor, Evas_Object *hotspot)
{
/* try to set the edje object theme */
if (!e_theme_edje_object_set(edje, "base/theme/pointer", cursor))
return EINA_FALSE;
if (!edje_object_part_swallow(edje, "e.swallow.hotspot", hotspot))
return EINA_FALSE;
if (!init)
{
edje_object_signal_emit(edje, "e,state,init", "e");
edje_object_message_signal_process(edje);
init = EINA_TRUE;
}
return EINA_TRUE;
}
static void
_e_pointer_x11_setup(E_Pointer *ptr, const char *cursor)
{
EINA_SAFETY_ON_FALSE_RETURN((e_comp->comp_type != E_PIXMAP_TYPE_WL));
if (ptr->e_cursor)
{
/* create a pointer canvas if we need to */
if ((!ptr->buffer_evas) && ptr->win) _e_pointer_canvas_add(ptr);
if (ptr->buffer_o_ptr && (ptr->buffer_o_ptr != ptr->o_ptr))
{
if (!_e_pointer_theme_object_setup(ptr->buffer_o_ptr, cursor, ptr->buffer_o_hot))
{
_e_pointer_x11_fallback_to_x11_pointer(ptr);
}
}
return;
}
_e_pointer_x11_fallback_to_x11_pointer(ptr);
}
static void
_e_pointer_type_set(E_Pointer *ptr, const char *type)
{
@ -486,18 +514,17 @@ _e_pointer_type_set(E_Pointer *ptr, const char *type)
if ((!ptr->buffer_evas) && ptr->win) _e_pointer_canvas_add(ptr);
_e_pointer_theme_buf(ptr, cursor);
/* try to set the edje object theme */
if (!e_theme_edje_object_set(ptr->o_ptr, "base/theme/pointer", cursor))
cursor[0] = 0;
edje_object_part_swallow(ptr->o_ptr, "e.swallow.hotspot", ptr->o_hot);
if (!init)
if (!_e_pointer_theme_object_setup(ptr->o_ptr, cursor, ptr->o_hot))
{
edje_object_signal_emit(ptr->o_ptr, "e,state,init", "e");
edje_object_message_signal_process(ptr->o_ptr);
init = EINA_TRUE;
if (e_comp->comp_type != E_PIXMAP_TYPE_WL)
{
_e_pointer_x11_setup(ptr, cursor);
}
else
{
_e_pointer_theme_object_setup(ptr->o_ptr, "default", ptr->o_hot);
}
}
_e_pointer_x11_setup(ptr, cursor);
if (!cursor[0]) return;
_hot_update(ptr);
@ -507,7 +534,17 @@ _e_pointer_type_set(E_Pointer *ptr, const char *type)
evas_object_show(ptr->o_ptr);
}
else
_e_pointer_x11_setup(ptr, NULL);
{
if (e_comp->comp_type != E_PIXMAP_TYPE_WL)
{
_e_pointer_x11_fallback_to_x11_pointer(ptr);
}
else
{
CRI("WL must always use the application pointer!!!");
_e_pointer_theme_object_setup(ptr->o_ptr, "default", ptr->o_hot);
}
}
}
EINTERN int
@ -849,7 +886,7 @@ e_pointer_object_set(E_Pointer *ptr, Evas_Object *obj, int x, int y)
int px, py;
EINA_SAFETY_ON_NULL_RETURN(ptr);
EINA_SAFETY_ON_NULL_RETURN(ptr->o_ptr);
EINA_SAFETY_ON_NULL_GOTO(ptr->o_ptr, misst);
ecore_evas_cursor_get(ptr->ee, &o, NULL, &px, &py);
if (o)
@ -885,6 +922,10 @@ e_pointer_object_set(E_Pointer *ptr, Evas_Object *obj, int x, int y)
ptr->client.ec = ec;
ptr->client.x = x;
ptr->client.y = y;
return;
misst:
INF("The ptr object of pointer %p is missing.", ptr);
}
E_API void

View File

@ -365,8 +365,10 @@ _e_powersave_event_update_free(void *data EINA_UNUSED, void *event)
else mode = powersave_mode;
free(event);
printf("PWSAVE: update free...\n");
if (mode > E_POWERSAVE_MODE_LOW)
{
printf("PWSAVE: low pwr hib=%i sus=%i\n", powersave_deferred_hibernate, powersave_deferred_suspend);
if (powersave_deferred_hibernate)
e_sys_action_do(E_SYS_HIBERNATE, NULL);
else if (powersave_deferred_suspend)

View File

@ -90,6 +90,7 @@ e_randr2_init(void)
E_CONFIG_LIST(D, T, screens, _e_randr2_cfg_screen_edd);
E_CONFIG_VAL(D, T, hotplug_response, DOUBLE);
E_CONFIG_VAL(D, T, restore, UCHAR);
E_CONFIG_VAL(D, T, use_cmd, UCHAR);
E_CONFIG_VAL(D, T, ignore_hotplug_events, UCHAR);
E_CONFIG_VAL(D, T, ignore_acpi_events, UCHAR);
E_CONFIG_VAL(D, T, default_policy, UINT);
@ -393,6 +394,7 @@ _config_load(void)
cfg->version = E_RANDR_CONFIG_VERSION;
cfg->screens = NULL;
cfg->restore = 1;
cfg->use_cmd = 0;
cfg->ignore_hotplug_events = 0;
cfg->ignore_acpi_events = 0;
cfg->default_policy = E_RANDR2_POLICY_EXTEND;
@ -785,6 +787,7 @@ _screens_differ(E_Randr2 *r1, E_Randr2 *r2)
return changed;
}
/*
static Eina_Bool
_cb_deferred_suspend_screen_change(void *data EINA_UNUSED)
{
@ -813,6 +816,7 @@ _cb_deferred_suspend_screen_change(void *data EINA_UNUSED)
}
return EINA_FALSE;
}
*/
static Eina_Bool
_cb_screen_change_delay(void *data EINA_UNUSED)
@ -931,8 +935,9 @@ _cb_screen_change_delay(void *data EINA_UNUSED)
if ((e_config->screensaver_suspend_on_ac) ||
(e_powersave_mode_get() > E_POWERSAVE_MODE_LOW))
{
printf("RRR: we should try and suspend now because on ac or suspend on ac is on\n");
ecore_timer_add(1.0, _cb_deferred_suspend_screen_change, NULL);
// disable for now.. moving to state system
// printf("RRR: we should try and suspend now because on ac or suspend on ac is on\n");
// ecore_timer_add(1.0, _cb_deferred_suspend_screen_change, NULL);
}
}
}
@ -1164,7 +1169,7 @@ again:
if (!common)
{
modes = eina_list_remove_list(modes, l);
// the list is no longer save to walk - so let's just
// the list is no longer safe to walk - so let's just
// walk it again from scratch
goto again;
}
@ -1238,11 +1243,13 @@ _screen_config_do(E_Randr2_Screen *s)
_config_do_recurse++;
// find dependent clones and find a common config res
cloneset = _screen_clones_find(e_randr2->screens, s);
printf("RRR: '%s' cloneset %p %i\n", s->info.name, cloneset, eina_list_count(cloneset));
if (cloneset)
{
_screen_clones_common_sync(cloneset);
eina_list_free(cloneset);
}
printf("RRR: _screen_config_do 2\n");
// if screen has a dependency...
if ((s->config.relative.mode != E_RANDR2_RELATIVE_UNKNOWN) &&
(s->config.relative.mode != E_RANDR2_RELATIVE_NONE) &&
@ -1258,9 +1265,11 @@ _screen_config_do(E_Randr2_Screen *s)
if (!s2->config.enabled) s2 = NULL;
}
}
printf("RRR: _screen_config_do 3\n");
s->config.geom.x = 0;
s->config.geom.y = 0;
printf("RRR: screen config do %ix%i rotation=%i\n", s->config.mode.w, s->config.mode.h, s->config.rotation);
printf("RRR: _screen_config_do 4\n");
if ((s->config.rotation == 0) || (s->config.rotation == 180))
{
s->config.geom.w = s->config.mode.w;
@ -1273,6 +1282,7 @@ _screen_config_do(E_Randr2_Screen *s)
}
if (s2)
{
printf("RRR: _screen_config_do 5\n");
if (s->config.relative.mode == E_RANDR2_RELATIVE_CLONE)
{
printf("RRR: clone relative\n");
@ -1321,6 +1331,7 @@ _screen_config_do(E_Randr2_Screen *s)
}
else
{
printf("RRR: _screen_config_do 6\n");
if ((s->config.relative.mode == E_RANDR2_RELATIVE_CLONE) &&
(s->config.relative.to))
{

View File

@ -102,6 +102,7 @@ struct _E_Config_Randr2
unsigned char restore;
unsigned char ignore_hotplug_events;
unsigned char ignore_acpi_events;
unsigned char use_cmd;
E_Randr2_Policy default_policy;
double hotplug_response;
};

View File

@ -88,6 +88,71 @@ e_screensaver_ignore_get(void)
return _screensaver_ignore;
}
static int
_e_screensaver_timeout_get(void)
{
int timeout = e_screensaver_timeout_get(EINA_TRUE);
if (!((e_config->screensaver_enable) &&
(!((e_util_fullscreen_current_any()) &&
(e_config->no_dpms_on_fullscreen)))))
timeout = 0;
if ((e_msgbus_data) &&
(e_msgbus_data->screensaver_inhibits))
timeout = 0;
return timeout;
}
E_API void
e_screensaver_force_update(void)
{
#ifndef HAVE_WAYLAND_ONLY
if (e_comp->comp_type != E_PIXMAP_TYPE_WL)
{
int timeout = _e_screensaver_timeout_get();
int x_timeout = ecore_x_screensaver_timeout_get();
if (!e_config->screensaver_dpms_off)
{
Eina_Bool x_dpms = ecore_x_dpms_enabled_get();
unsigned int x_standby = 0, x_suspend = 0, x_off = 0;
unsigned int standby = 0, suspend = 0, off = 0;
if (e_dpms_actual != x_dpms)
{
printf("SCRSV: someone else messed with screen dpms!\n");
ecore_x_dpms_enabled_set(e_config->screensaver_enable);
}
off = suspend = standby = e_screensaver_timeout_get(EINA_FALSE);
standby += E_DPMS_STANDBY;
suspend += E_DPMS_SUSPEND;
off += E_DPMS_OFF;
ecore_x_dpms_timeouts_get(&x_standby, &x_suspend, &x_off);
if ((x_standby != standby) || (x_suspend != suspend) ||
(x_off != off))
{
printf("SCRSV: someone else messed with screen dpms timeouts!\n");
ecore_x_dpms_timeouts_set(standby, suspend, off);
}
}
if (timeout != x_timeout)
{
printf("SCRSV: someone else messed with screen blanking!\n");
ecore_x_screensaver_set(timeout,
e_config->screensaver_interval,
e_config->screensaver_blanking,
e_config->screensaver_expose);
}
}
#endif
}
E_API int
e_screensaver_current_timeout_get(void)
{
return _e_screensaver_timeout_get();
}
E_API void
e_screensaver_update(void)
{
@ -109,15 +174,7 @@ e_screensaver_update(void)
_e_screensaver_cfg_timeout = e_config->screensaver_timeout;
_e_screensaver_cfg_dim = dim_timeout;
timeout = e_screensaver_timeout_get(EINA_TRUE);
if (!((e_config->screensaver_enable) &&
(!((e_util_fullscreen_current_any()) &&
(e_config->no_dpms_on_fullscreen)))))
timeout = 0;
if (e_msgbus_data)
{
if (e_msgbus_data->screensaver_inhibits) timeout = 0;
}
timeout = _e_screensaver_timeout_get();
if (_e_screensaver_timeout != timeout)
{
@ -153,7 +210,7 @@ e_screensaver_update(void)
// screen doesn't turn off at all because x thinks internally
// that the monitor is still off... so this is odd, but it's
// necessary on some hardware.
if ((real_changed) && (!e_config->screensaver_dpms_off))
if (real_changed && (!e_config->screensaver_dpms_off))
{
ecore_x_dpms_enabled_set(!e_config->screensaver_enable);
ecore_x_dpms_enabled_set(e_config->screensaver_enable);

View File

@ -11,6 +11,8 @@ E_API void e_screensaver_ignore(void);
E_API void e_screensaver_unignore(void);
E_API Eina_Bool e_screensaver_ignore_get(void);
E_API void e_screensaver_force_update(void);
E_API int e_screensaver_current_timeout_get(void);
E_API void e_screensaver_update(void);
E_API int e_screensaver_timeout_get(Eina_Bool use_idle);

123
src/bin/e_sound.c Normal file
View File

@ -0,0 +1,123 @@
#include <e.h>
#include <Ecore_Audio.h>
static int _can_sound_out = -1;
static Eo *_sound_out = NULL;
static int _outs = 0;
static Ecore_Timer *_outs_end_timer = NULL;
static void
_cb_out_fail(void *data EINA_UNUSED, const Efl_Event *event)
{
efl_unref(event->object);
_sound_out = NULL;
_can_sound_out = 0;
}
static void
_cb_out_ready(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
{
_can_sound_out = 1;
}
static Eina_Bool
_cb_outs_end_timer(void *data EINA_UNUSED)
{
efl_unref(_sound_out);
_sound_out = NULL;
return EINA_FALSE;
}
static void
_out_end(void)
{
if (_outs > 0) _outs--;
if (_outs == 0)
{
if (_outs_end_timer) ecore_timer_del(_outs_end_timer);
_outs_end_timer = ecore_timer_add(2.0, _cb_outs_end_timer, NULL);
}
}
static void
_cb_in_stopped(void *data EINA_UNUSED, const Efl_Event *event)
{
efl_unref(event->object);
_out_end();
}
E_API int
e_sound_init(void)
{
ecore_audio_init();
return 1;
}
E_API int
e_sound_shutdown(void)
{
if (_outs_end_timer)
{
ecore_timer_del(_outs_end_timer);
_outs_end_timer = NULL;
}
if (_sound_out)
{
efl_unref(_sound_out);
_sound_out = NULL;
}
ecore_audio_shutdown();
return 1;
}
E_API void
e_sound_file_play(const char *file, double vol)
{
Eo *in;
char buf[PATH_MAX];
if (_can_sound_out == 0) return;
if (!_sound_out)
_sound_out = efl_add_ref
(ECORE_AUDIO_OUT_PULSE_CLASS, NULL,
efl_event_callback_add(efl_added,
ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL,
_cb_out_fail, NULL),
efl_event_callback_add(efl_added,
ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY,
_cb_out_ready, NULL)
);
if (!_sound_out) return;
if (_outs_end_timer)
{
ecore_timer_del(_outs_end_timer);
_outs_end_timer = NULL;
}
_outs++;
snprintf(buf, sizeof(buf), "sound-file[%s]", file);
in = efl_add_ref(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL,
efl_name_set(efl_added, buf),
efl_event_callback_add(efl_added,
ECORE_AUDIO_IN_EVENT_IN_STOPPED,
_cb_in_stopped, NULL));
if (!in)
{
_out_end();
return;
}
if (!ecore_audio_obj_source_set(in, file))
{
efl_unref(in);
_out_end();
return;
}
ecore_audio_obj_volume_set(in, vol);
if (!ecore_audio_obj_out_input_attach(_sound_out, in))
{
efl_unref(in);
_out_end();
return;
}
}

10
src/bin/e_sound.h Normal file
View File

@ -0,0 +1,10 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_SOUND_H
#define E_SOUND_H
E_API int e_sound_init(void);
E_API int e_sound_shutdown(void);
E_API void e_sound_file_play(const char *file, double vol);
#endif
#endif

View File

@ -524,6 +524,7 @@ main(int argc, char **argv)
struct sigaction action;
pid_t child = -1;
Eina_Bool restart = EINA_TRUE;
unsigned int provided_eina_version, required_eina_version;
unsetenv("NOTIFY_SOCKET");
@ -547,6 +548,58 @@ main(int argc, char **argv)
eina_init();
/* check eina version ... this should be the whole efl version */
/* check for sanity here in case someone has done something very silly */
provided_eina_version =
(eina_version->major * 1000 * 1000) +
(eina_version->minor * 1000 ) +
(eina_version->micro);
required_eina_version =
(MIN_EFL_VERSION_MAJ * 1000 * 1000) +
(MIN_EFL_VERSION_MIN * 1000) +
(MIN_EFL_VERSION_MIC);
printf("Enlightenment: EFL Version Check: %u >= %u\n",
provided_eina_version, required_eina_version);
if (provided_eina_version < required_eina_version)
{
char *logf = NULL, *logf_old = NULL;
FILE *fps[2];
FILE *outf;
home = getenv("HOME");
// rename old olg file
if (!home)
{
myasprintf(&logf, ".e-log.log");
myasprintf(&logf_old, ".e-log.log.old");
}
else
{
myasprintf(&logf, "%s/.e-log.log", home);
myasprintf(&logf_old, "%s/.e-log.log.old", home);
}
rename(logf, logf_old);
outf = fopen(logf, "w");
fps[0] = stderr;
fps[1] = outf;
for (i = 0; i < 2; i++)
{
if (fps[i])
fprintf(fps[i],
"ERROR: EFL version provided is %i.%i.%i\n"
"Enlightenment requires a minimum of %i.%i.%i\n"
"Abort\n",
eina_version->major,
eina_version->minor,
eina_version->micro,
MIN_EFL_VERSION_MAJ,
MIN_EFL_VERSION_MIN,
MIN_EFL_VERSION_MIC);
}
if (outf) fclose(outf);
exit(42); // exit 42 for this as life the universe and everything...
}
/* reexcute myself with dbus-launch if dbus-launch is not running yet */
if ((!getenv("DBUS_SESSION_BUS_ADDRESS")) &&
(!getenv("DBUS_LAUNCHD_SESSION_BUS_SOCKET")))
@ -585,6 +638,11 @@ main(int argc, char **argv)
printf(" \n");
printf(" E_WL_FORCE=drm enlightenment_start \n");
printf(" \n");
printf(" If you wish to set software or GL rendering too then also: \n");
printf(" \n");
printf(" E_WL_FORCE=drm E_COMP_ENGINE=gl enlightenment_start \n");
printf(" E_WL_FORCE=drm E_COMP_ENGINE=sw enlightenment_start \n");
printf(" \n");
sleep(10);
}
for (i = 1; i < argc; i++)

340
src/bin/e_state.c Normal file
View File

@ -0,0 +1,340 @@
#include "e.h"
/* public variables */
E_API int E_EVENT_STATE_CHANGE = 0;
/* private stuff */
typedef struct _E_State_Item_Change_Callback
{
const char *glob;
void (*cb) (void *data, E_State_Item item, Eina_Bool del);
void *data;
Eina_Bool delete_me : 1;
} E_State_Item_Change_Callback;
static Eina_Hash *_e_state_items = NULL;
static int _e_state_change_callbacks_walking = 0;
static Eina_Bool _e_state_change_callbacks_need_del= EINA_FALSE;
static Eina_List *_e_state_change_callbacks = NULL;
static void
_state_item_free(void *data)
{
E_State_Item *it = data;
if (it->name) eina_stringshare_del(it->name);
if (it->type == E_STATE_STRING) eina_stringshare_del(it->val.s);
free(data);
}
static void
_state_event_free(void *data EINA_UNUSED, void *ev)
{
E_Event_State *e = ev;
Eina_List *l, *ll;
E_State_Item_Change_Callback *cbit;
_e_state_change_callbacks_walking++;
EINA_LIST_FOREACH(_e_state_change_callbacks, l, cbit)
{
if (eina_fnmatch(cbit->glob, e->item.name, 0))
{
cbit->cb(cbit->data, e->item,
(e->event == E_STATE_DEL) ?
EINA_TRUE : EINA_FALSE);
}
}
_e_state_change_callbacks_walking--;
if ((_e_state_change_callbacks_walking == 0) &&
(_e_state_change_callbacks_need_del))
{
EINA_LIST_FOREACH_SAFE(_e_state_change_callbacks, l, ll, cbit)
{
if (cbit->delete_me)
{
_e_state_change_callbacks =
eina_list_remove_list(_e_state_change_callbacks, l);
eina_stringshare_del(cbit->glob);
free(cbit);
}
}
_e_state_change_callbacks_need_del = EINA_FALSE;
}
if (e->item.name) eina_stringshare_del(e->item.name);
if (e->item.type == E_STATE_STRING) eina_stringshare_del(e->item.val.s);
free(e);
}
/* public functions */
EINTERN int
e_state_init(void)
{
E_EVENT_STATE_CHANGE = ecore_event_type_new();
_e_state_items = eina_hash_string_superfast_new(_state_item_free);
return 1;
}
EINTERN int
e_state_shutdown(void)
{
E_State_Item_Change_Callback *cbit;
E_FREE_FUNC(_e_state_items, eina_hash_free);
EINA_LIST_FREE(_e_state_change_callbacks, cbit)
{
eina_stringshare_del(cbit->glob);
free(cbit);
}
return 1;
}
E_API void
e_state_item_change_callback_add(const char *glob, void (*cb) (void *data, E_State_Item item, Eina_Bool del), const void *data)
{
E_State_Item_Change_Callback *cbit = calloc(1, sizeof(E_State_Item_Change_Callback));
if (!cbit) return;
cbit->glob = eina_stringshare_add(glob);
if (!cbit->glob)
{
free(cbit);
return;
}
cbit->cb = cb;
cbit->data = (void *)data;
_e_state_change_callbacks = eina_list_append(_e_state_change_callbacks, cbit);
}
E_API void
e_state_item_change_callback_del(const char *glob, void (*cb) (void *data, E_State_Item item, Eina_Bool del), const void *data)
{
Eina_List *l;
E_State_Item_Change_Callback *cbit;
EINA_LIST_FOREACH(_e_state_change_callbacks, l, cbit)
{
if ((!strcmp(cbit->glob, glob)) &&
(cbit->cb == cb) && (cbit->data == data))
{
if (_e_state_change_callbacks_walking > 0)
{
cbit->delete_me = EINA_TRUE;
_e_state_change_callbacks_need_del = EINA_TRUE;
break;
}
_e_state_change_callbacks =
eina_list_remove_list(_e_state_change_callbacks, l);
eina_stringshare_del(cbit->glob);
free(cbit);
return;
}
}
}
E_API E_State_Item
e_state_item_get(const char *name)
{
E_State_Item it = { NULL, E_STATE_UNKNOWN, { 0 } };
E_State_Item *it2 = eina_hash_find(_e_state_items, name);
if (it2) it = *it2;
return it;
}
E_API void
e_state_item_set(E_State_Item it)
{
E_State_Item *it2 = eina_hash_find(_e_state_items, it.name);
Eina_Bool changed = EINA_FALSE;
if (!it2)
{
it2 = calloc(1, sizeof(E_State_Item));
if (!it2) return;
it2->name = eina_stringshare_add(it.name);
eina_hash_add(_e_state_items, it2->name, it2);
changed = EINA_TRUE;
}
if (!changed)
{
if (it2->type != it.type) changed = EINA_TRUE;
}
if (!changed)
{
switch (it2->type)
{
case E_STATE_UNKNOWN:
changed = EINA_TRUE;
break;
case E_STATE_BOOL:
if (it2->val.b != it.val.b) changed = EINA_TRUE;
break;
case E_STATE_INT:
if (it2->val.i != it.val.i) changed = EINA_TRUE;
break;
case E_STATE_UINT:
if (it2->val.u != it.val.u) changed = EINA_TRUE;
break;
case E_STATE_DOUBLE:
if (!EINA_FLT_EQ(it2->val.d, it.val.d)) changed = EINA_TRUE;
break;
case E_STATE_STRING:
if (!((it2->val.s) && (it.val.s) &&
(!strcmp(it2->val.s, it.val.s))))
changed = EINA_TRUE;
break;
default:
break;
}
}
if (changed)
{
E_Event_State *e;
if (it2->type == E_STATE_STRING)
{
eina_stringshare_del(it2->val.s);
it2->val.s = NULL;
}
it2->type = it.type;
if (it2->type == E_STATE_STRING)
it2->val.s = eina_stringshare_add(it.val.s);
else
it2->val = it.val;
e = calloc(1, sizeof(E_Event_State));
if (e)
{
e->event = E_STATE_CHANGE;
e->item = *it2;
e->item.name = eina_stringshare_add(e->item.name);
if (e->item.type == E_STATE_STRING)
e->item.val.s = eina_stringshare_add(e->item.val.s);
ecore_event_add(E_EVENT_STATE_CHANGE, e, _state_event_free, NULL);
}
}
}
E_API void
e_state_item_del(const char *name)
{
E_State_Item *it2 = eina_hash_find(_e_state_items, name);
if (it2)
{
E_Event_State *e = calloc(1, sizeof(E_Event_State));
if (e)
{
e->event = E_STATE_DEL;
e->item = *it2;
e->item.name = eina_stringshare_add(e->item.name);
if (e->item.type == E_STATE_STRING)
e->item.val.s = eina_stringshare_add(e->item.val.s);
ecore_event_add(E_EVENT_STATE_CHANGE, e, _state_event_free, NULL);
}
eina_hash_del_by_key(_e_state_items, name);
}
}
E_API Eina_Bool
e_state_item_val_bool_get(const char *name)
{
E_State_Item it = e_state_item_get(name);
if (it.type != E_STATE_BOOL) return EINA_FALSE;
return it.val.b;
}
E_API int
e_state_item_val_int_get(const char *name)
{
E_State_Item it = e_state_item_get(name);
if (it.type != E_STATE_INT) return 0;
return it.val.i;
}
E_API unsigned int
e_state_item_val_uint_get(const char *name)
{
E_State_Item it = e_state_item_get(name);
if (it.type != E_STATE_UINT) return 0;
return it.val.u;
}
E_API double
e_state_item_val_double_get(const char *name)
{
E_State_Item it = e_state_item_get(name);
if (it.type != E_STATE_DOUBLE) return 0.0;
return it.val.d;
}
E_API const char *
e_state_item_val_string_get(const char *name)
{
E_State_Item it = e_state_item_get(name);
if (it.type != E_STATE_STRING) return NULL;
return it.val.s;
}
E_API void
e_state_item_val_bool_set(const char *name, Eina_Bool b)
{
E_State_Item it;
it.name = name;
it.type = E_STATE_BOOL;
it.val.b = b;
e_state_item_set(it);
}
E_API void
e_state_item_val_int_set(const char *name, int i)
{
E_State_Item it;
it.name = name;
it.type = E_STATE_INT;
it.val.i = i;
e_state_item_set(it);
}
E_API void
e_state_item_val_uint_set(const char *name, unsigned int u)
{
E_State_Item it;
it.name = name;
it.type = E_STATE_UINT;
it.val.u = u;
e_state_item_set(it);
}
E_API void
e_state_item_val_double_set(const char *name, double d)
{
E_State_Item it;
it.name = name;
it.type = E_STATE_DOUBLE;
it.val.d = d;
e_state_item_set(it);
}
E_API void
e_state_item_val_string_set(const char *name, const char *s)
{
E_State_Item it;
it.name = name;
it.type = E_STATE_STRING;
it.val.s = s;
e_state_item_set(it);
}

76
src/bin/e_state.h Normal file
View File

@ -0,0 +1,76 @@
#ifdef E_TYPEDEFS
/* struct used to pass to event handlers */
typedef struct _E_Event_State E_Event_State;
typedef struct _E_State_Item E_State_Item;
typedef union _E_State_Val E_State_Val;
typedef enum
{
E_STATE_UNKNOWN,
E_STATE_BOOL,
E_STATE_INT,
E_STATE_UINT,
E_STATE_DOUBLE,
E_STATE_STRING
} E_State_Type;
typedef enum
{
E_STATE_CHANGE,
E_STATE_DEL
} E_State_Event;
#else
# ifndef E_STATE_H
# define E_STATE_H
union _E_State_Val
{
Eina_Bool b;
int i;
unsigned int u;
double d;
const char *s;
};
struct _E_State_Item
{
const char *name;
E_State_Type type;
E_State_Val val;
};
struct _E_Event_State
{
E_State_Event event;
E_State_Item item;
};
EINTERN int e_state_init(void);
EINTERN int e_state_shutdown(void);
E_API void e_state_item_change_callback_add(const char *glob, void (*cb) (void *data, E_State_Item item, Eina_Bool del), const void *data);
E_API void e_state_item_change_callback_del(const char *glob, void (*cb) (void *data, E_State_Item item, Eina_Bool del), const void *data);
E_API E_State_Item e_state_item_get(const char *name);
E_API void e_state_item_set(E_State_Item it);
E_API void e_state_item_del(const char *name);
E_API Eina_Bool e_state_item_val_bool_get(const char *name);
E_API int e_state_item_val_int_get(const char *name);
E_API unsigned int e_state_item_val_uint_get(const char *name);
E_API double e_state_item_val_double_get(const char *name);
E_API const char *e_state_item_val_string_get(const char *name);
E_API void e_state_item_val_bool_set(const char *name, Eina_Bool b);
E_API void e_state_item_val_int_set(const char *name, int i);
E_API void e_state_item_val_uint_set(const char *name, unsigned int u);
E_API void e_state_item_val_double_set(const char *name, double d);
E_API void e_state_item_val_string_set(const char *name, const char *s);
extern E_API int E_EVENT_STATE_CHANGE;
# endif
#endif

View File

@ -522,26 +522,20 @@ e_sys_shutdown(void)
_e_sys_acpi_handler = NULL;
if (login1_session_proxy)
{
Eldbus_Connection *conn;
Eldbus_Object *obj;
obj = eldbus_proxy_object_get(login1_session_proxy);
conn = eldbus_object_connection_get(obj);
eldbus_proxy_unref(login1_session_proxy);
eldbus_object_unref(obj);
eldbus_connection_unref(conn);
login1_session_proxy = NULL;
}
if (login1_manger_proxy)
{
Eldbus_Connection *conn;
Eldbus_Object *obj;
obj = eldbus_proxy_object_get(login1_manger_proxy);
conn = eldbus_object_connection_get(obj);
eldbus_proxy_unref(login1_manger_proxy);
eldbus_object_unref(obj);
eldbus_connection_unref(conn);
login1_manger_proxy = NULL;
}
if (_e_sys_systemd_inhibit_fd >= 0)

View File

@ -342,6 +342,7 @@ main(int argc,
rm = EINA_FALSE;
eina_stringshare_del(s);
}
eina_iterator_free(it);
if (rm)
{
if (rmdir(path))
@ -358,6 +359,19 @@ main(int argc,
/* local subsystem functions */
#ifdef HAVE_EEZE_MOUNT
static Eina_Bool
check_is_num_to_comma(const char *s)
{
const char *p;
for (p = s; *p && (*p != ','); p++)
{
if (!((*p >= '0') && (*p <= '9'))) return EINA_FALSE;
}
return EINA_TRUE;
}
static Eina_Bool
mountopts_check(const char *opts)
{
@ -400,6 +414,8 @@ mountopts_check(const char *opts)
{
p += 4;
errno = 0;
if (!check_is_num_to_comma(p)) return EINA_FALSE;
muid = strtoul(p, &end, 10);
if (muid == ULONG_MAX) return EINA_FALSE;
if (errno) return EINA_FALSE;
@ -414,13 +430,53 @@ mountopts_check(const char *opts)
return EINA_TRUE;
}
static Eina_Bool
check_is_alpha_num(char c)
{
if (((c >= '0') && (c <= '9')) ||
((c >= 'a') && (c <= 'z')) ||
((c >= 'A') && (c <= 'Z'))) return EINA_TRUE;
return EINA_FALSE;
}
static Eina_Bool
check_uuid(const char *uuid)
{
const char *p;
for (p = uuid; p[0]; p++)
if ((!isalnum(*p)) && (*p != '-')) return EINA_FALSE;
{
if ((!check_is_alpha_num(*p)) && (*p != '-')) return EINA_FALSE;
}
return EINA_TRUE;
}
static Eina_Bool
check_sane_path(const char *path)
{
const char *forbidden_ch = "`~!#$%^&*()[]{}|\\;'\"<>?";
const char *p;
if (strstr(path, "..")) return EINA_FALSE; // just don't allow .. anywhere
for (p = forbidden_ch; *p; p++) // no invalid chars like above
{
if (strchr(path, *p)) return EINA_FALSE;
}
for (p = path; *p; p++) // nothing in lower ascii ctrl chars or high ascii
{
if ((*p <= ' ') || (*p >= 0x7f)) return EINA_FALSE;
}
return EINA_TRUE;
}
static Eina_Bool
check_sane_dev(const char *dev)
{
struct stat st;
if (strncmp(dev, "/dev/", 5)) return EINA_FALSE; // not a /dev file
if (!check_sane_path(dev)) return EINA_FALSE;
if (stat(dev, &st)) return EINA_FALSE; // must actually exist
return EINA_TRUE;
}
@ -428,9 +484,9 @@ static Eina_Bool
mount_args_check(int argc, char **argv, const char *action)
{
Eina_Bool opts = EINA_FALSE;
struct stat st;
const char *node;
char buf[PATH_MAX];
struct stat st;
if (!strcmp(action, "mount"))
{
@ -451,9 +507,9 @@ mount_args_check(int argc, char **argv, const char *action)
}
else
{
if (strncmp(argv[4], "/dev/", 5)) return EINA_FALSE;
if (stat(argv[4], &st)) return EINA_FALSE;
if (!check_sane_dev(argv[4])) return EINA_FALSE;
}
if (!check_sane_path(argv[5])) return EINA_FALSE;
node = strrchr(argv[5], '/');
if (!node) return EINA_FALSE;
@ -468,8 +524,7 @@ mount_args_check(int argc, char **argv, const char *action)
/path/to/umount /dev/$devnode
*/
if (argc != 3) return EINA_FALSE;
if (strncmp(argv[2], "/dev/", 5)) return EINA_FALSE;
if (stat(argv[2], &st)) return EINA_FALSE;
if (!check_sane_dev(argv[2])) return EINA_FALSE;
node = strrchr(argv[2], '/');
if (!node) return EINA_FALSE;
if (!node[1]) return EINA_FALSE;
@ -488,8 +543,7 @@ mount_args_check(int argc, char **argv, const char *action)
/path/to/eject /dev/$devnode
*/
if (argc != 3) return EINA_FALSE;
if (strncmp(argv[2], "/dev/", 5)) return EINA_FALSE;
if (stat(argv[2], &st)) return EINA_FALSE;
if (!check_sane_dev(argv[2])) return EINA_FALSE;
node = strrchr(argv[2], '/');
if (!node) return EINA_FALSE;
if (!node[1]) return EINA_FALSE;
@ -545,10 +599,8 @@ auth_action_ok(char *a,
*/
ret = auth_etc_enlightenment_sysactions(a, usr, grp);
if (ret == 1) return 1;
else if (ret == -1)
return 0;
/* the DEFAULT - allow */
return 1;
else if (ret == -1) return 0;
return 0; // no sysactions.conf file found - just say no. bad system
}
static int

View File

@ -146,8 +146,12 @@ static void
_update_machid_get(void)
{
FILE *f;
char buf[4096], *c;
static const char appid[] = "EnL+7',xkDv&!@*)df%@#hcs$;l%o$fc#^$%&%$FDFeJ$%c^$#";
static const char hex[] = "0123456789abcdef";
char buf[4096], buf2[4096 + 1024], *c;
unsigned char sha[20];
size_t len;
int i;
f = fopen("/etc/machine-id", "r");
if (!f) f = fopen("/var/lib/dbus/machine-id", "r");
@ -159,7 +163,7 @@ _update_machid_get(void)
if (f)
{
len = fread(buf, 1, sizeof(buf) - 1, f);
if (len > 10)
if ((len > 10) && (len < 4000))
{
buf[len] = 0;
for (c = buf; *c; c++)
@ -170,6 +174,14 @@ _update_machid_get(void)
break;
}
}
snprintf(buf2, sizeof(buf2), "{{%s}}/{{%s}}", buf, appid);
e_sha1_sum((unsigned char *)buf2, strlen(buf2), sha);
for (i = 0; i < 20; i++)
{
buf[(i * 2) + 0] = hex[((sha[i] >> 4) & 0xf)];
buf[(i * 2) + 1] = hex[((sha[i] ) & 0xf)];
}
buf[(i * 2)] = 0;
machid = strdup(buf);
fclose(f);
return;
@ -187,7 +199,6 @@ _update_machid_get(void)
t = ecore_time_unix_get();
fprintf(f, "%1.16f-%i-%i\n", t, rand(), rand());
fclose(f);
_update_machid_get();
return;
}
// this just is all a wash - just use this
@ -259,6 +270,7 @@ e_update_init(void)
_update_timeout_cb(NULL);
e_config->update.check = 1;
}
_update_machid_get();
}
return 1;
}

View File

@ -1174,10 +1174,7 @@ e_util_terminal_desktop_get(void)
{
const char *terms[] =
{
"terminology.desktop",
"rxvt.desktop",
"gnome-terminal.desktop",
"konsole.desktop",
#include "e_inc_terms.h"
NULL
};
const char *s;

View File

@ -85,33 +85,33 @@ _resolutions_calc(int w, int h)
{
int i, j = 0;
int nw, nh, pw = 0, ph = 0;
Mip *mips = calloc(1, sizeof(Mip) * MAX_RES_NUM);
Mip *mips_ = calloc(1, sizeof(Mip) * MAX_RES_NUM);
if (!mips) return NULL;
if (!mips_) return NULL;
for (i = 0; resolutions[i]; i += 2)
{
nh = resolutions[i + 1];
nw = (w * nh) / h;
if ((nh >= h) || (nw >= w))
{
mips[j].from_w = pw;
mips[j].from_h = ph;
mips[j].to_w = 1000000000;
mips[j].to_h = 1000000000;
mips[j].last = EINA_TRUE;
mips_[j].from_w = pw;
mips_[j].from_h = ph;
mips_[j].to_w = 1000000000;
mips_[j].to_h = 1000000000;
mips_[j].last = EINA_TRUE;
break;
}
mips[j].from_w = pw;
mips[j].from_h = ph;
mips[j].to_w = nw;
mips[j].to_h = nh;
mips_[j].from_w = pw;
mips_[j].from_h = ph;
mips_[j].to_w = nw;
mips_[j].to_h = nh;
j++;
pw = nw + 1;
ph = nh + 1;
}
return mips;
return mips_;
}
EAPI int
@ -123,7 +123,7 @@ elm_main(int argc, char **argv)
int bg_b = 64;
char dir_buf[128], img_buf[256], edc_buf[256], cmd_buf[1024], qual_buf[64];
const char *dir, *quality_string = NULL, *img_name = NULL;
Mip *mips = NULL;
Mip *mips_ = NULL;
int i, imw, imh, w, h, quality;
int ret = 0, mips_num = 0;
Eina_Bool alpha;
@ -207,25 +207,25 @@ elm_main(int argc, char **argv)
(!strcmp(mode, "scale_out")) ||
(!strcmp(mode, "pan")))
{ // need to produce multiple scaled versions
mips = _resolutions_calc(w, h);
if (!mips) return 6;
for (i = 0; mips[i].to_w; i++)
mips_ = _resolutions_calc(w, h);
if (!mips_) return 6;
for (i = 0; mips_[i].to_w; i++)
{
mips_num++;
if (mips[i].last)
if (mips_[i].last)
{
imw = w;
imh = h;
}
else
{
imw = mips[i].to_w;
imh = mips[i].to_h;
imw = mips_[i].to_w;
imh = mips_[i].to_h;
}
evas_object_resize(subwin, imw, imh);
evas_object_resize(image, imw, imh);
elm_win_render(subwin);
if (mips[i].last)
if (mips_[i].last)
snprintf(img_buf, sizeof(img_buf), "%s/img.png",
dir);
else
@ -239,7 +239,7 @@ elm_main(int argc, char **argv)
}
}
// no multiple resolutions -0 save out original
if (!mips)
if (!mips_)
{
evas_object_resize(subwin, w, h);
evas_object_resize(image, w, h);
@ -267,7 +267,7 @@ elm_main(int argc, char **argv)
snprintf(edc_buf, sizeof(edc_buf), "%s/bg.edc", dir);
f = fopen(edc_buf, "w");
if (!f) goto cleanup;
if ((mips) && (mips_num > 1))
if ((mips_) && (mips_num > 1))
{
fprintf(f,
"images {\n"
@ -276,7 +276,7 @@ elm_main(int argc, char **argv)
{
fprintf(f,
" image {\n");
if (mips[i].last)
if (mips_[i].last)
{
fprintf(f,
" image: \"img.png\" %s;\n",
@ -284,8 +284,8 @@ elm_main(int argc, char **argv)
}
else
{
imw = mips[i].to_w;
imh = mips[i].to_h;
imw = mips_[i].to_w;
imh = mips_[i].to_h;
fprintf(f,
" image: \"img-%ix%i.png\" %s;\n",
imw, imh, quality_string);
@ -293,8 +293,8 @@ elm_main(int argc, char **argv)
fprintf(f,
" size: %i %i %i %i;\n"
" }\n",
mips[i].from_w, mips[i].from_h,
mips[i].to_w, mips[i].to_h);
mips_[i].from_w, mips_[i].from_h,
mips_[i].to_w, mips_[i].to_h);
}
fprintf(f,
" }\n"
@ -489,7 +489,7 @@ elm_main(int argc, char **argv)
}
ret = system(cmd_buf);
cleanup:
free(mips);
free(mips_);
ecore_file_recursive_rm(dir);
evas_object_del(win);
return ret;

View File

@ -8,7 +8,7 @@ static void
_cb_watchdog_thread_pingpong_pipe(void *data EINA_UNUSED, void *buf, unsigned int bytes)
{
unsigned long long *seq = buf;
unsigned long long seq_num = bytes / sizeof(int);
unsigned long long seq_num = bytes / sizeof(unsigned long long);
if (seq_num < 1)
{
@ -54,8 +54,9 @@ _cb_watchdog_thread_pingpong(void *data EINA_UNUSED, Ecore_Thread *thread)
static void
_cb_watchdog_thread_pingpong_reply(void *data EINA_UNUSED, Ecore_Thread *thread EINA_UNUSED, void *msg)
{
// repluy back to mainloop with same ping number
// reply back to mainloop with same ping number
unsigned long long *seq = msg;
ecore_pipe_write(_watchdog_pipe, seq, sizeof(unsigned long long));
free(seq);
}

View File

@ -25,6 +25,7 @@ deps_e = [
dep_ecore_con,
dep_ecore_input,
dep_ecore_input_evas,
dep_ecore_audio,
dep_evas,
dep_efreet,
dep_efreet_mime,
@ -59,6 +60,7 @@ requires_e = ' '.join([
'ecore-con',
'ecore-input',
'ecore-input-evas',
'ecore-audio',
'evas',
'efreet',
'efreet-mime',
@ -179,6 +181,7 @@ src = [
'e_slidesel.c',
'e_spectrum.c',
'e_startup.c',
'e_state.c',
'e_sys.c',
'e_system.c',
'e_test.c',
@ -224,6 +227,7 @@ src = [
'e_zoomap.c',
'e_zone.c',
'e_gesture.c',
'e_sound.c',
'efx/efx_bumpmapping.c',
'efx/efx.c',
'efx/efx_fade.c',
@ -358,6 +362,7 @@ hdr = [
'e_slidesel.h',
'e_spectrum.h',
'e_startup.h',
'e_state.h',
'e_sys.h',
'e_system.h',
'e_test.h',
@ -403,7 +408,8 @@ hdr = [
'e_xsettings.h',
'e_zoomap.h',
'e_zone.h',
'e_gesture.h'
'e_gesture.h',
'e_sound.h'
]
if config_h.has('HAVE_WAYLAND') == true

View File

@ -246,7 +246,7 @@ _light_device_include(const char *dev)
#endif
static void
_light_refresh_devices()
_light_refresh_devices(void)
{
Light *lig;

View File

@ -304,9 +304,14 @@ err:
static Eina_Bool
_ddc_init(void)
{
// .so.3 is ABI compatible twith .so.2 for out uses - see
// https://www.ddcutil.com/c_api_99/ for changes between them
ddc_lib = dlopen("libddcutil.so.4", RTLD_NOW | RTLD_LOCAL);
// .so.[345] are ABI compatible with .so.2 for our uses - see
// the changes listed at:
// - https://www.ddcutil.com/c_api_99/
// - https://www.ddcutil.com/c_api_120/
// - https://www.ddcutil.com/c_api_200/
ddc_lib = dlopen("libddcutil.so.5", RTLD_NOW | RTLD_LOCAL);
if (!ddc_lib)
ddc_lib = dlopen("libddcutil.so.4", RTLD_NOW | RTLD_LOCAL);
if (!ddc_lib)
ddc_lib = dlopen("libddcutil.so.3", RTLD_NOW | RTLD_LOCAL);
if (!ddc_lib)

View File

@ -90,9 +90,12 @@ _power_suspend_init(void)
static void
_power_hibernate_init(void)
{
#if defined (__FreeBSD__) || defined (__OpenBSD__)
#if defined (__FreeBSD__)
if (ecore_file_app_installed("acpiconf"))
_cmd_hibernate = strdup("acpiconf -s4");
#elif defined (__OpenBSD__)
if (ecore_file_app_installed("ZZZ"))
_cmd_suspend = strdup("ZZZ");
#else
if (ecore_file_app_installed("systemctl"))
_cmd_hibernate = strdup("systemctl hibernate");
@ -106,7 +109,8 @@ _power_hibernate_init(void)
_cmd_hibernate = strdup("/etc/acpi/pm-hibernate");
#endif
// linux systemd: PATH/systemctl hibernate
// bsd: acpiconf -s4
// FreeBSD: acpiconf -s4
// OpenBSD: ZZZ
// if exist:
// PATH/hibernate.sh
// /etc/acpi/hibernate.sh force

Some files were not shown because too many files have changed in this diff Show More