Compare commits
No commits in common. "master" and "master" have entirely different histories.
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"project_id" : "enlightenment-git",
|
||||
"projects" : "enlightenment-git",
|
||||
"conduit_uri" : "https://phab.enlightenment.org/",
|
||||
"phabricator.uri" : "https://phab.enlightenment.org/"
|
||||
}
|
2
COPYING
|
@ -1,6 +1,6 @@
|
|||
Copyright notice for Enlightenment:
|
||||
|
||||
Copyright (C) 2000-2024 Carsten Haitzler and various contributors (see AUTHORS)
|
||||
Copyright (C) 2000-2020 Carsten Haitzler and various contributors (see AUTHORS)
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
** COMPILING and INSTALLING **
|
||||
------------------------------
|
||||
|
||||
Meson is the build system used for this project. For more information please
|
||||
see:
|
||||
|
||||
http://mesonbuild.com
|
||||
|
||||
----
|
||||
|
||||
Normal compilation in /usr/local:
|
||||
|
||||
meson . build
|
||||
ninja -C build
|
||||
sudo ninja -C build install
|
||||
|
||||
For meson build generic options:
|
||||
|
||||
meson --help
|
||||
|
||||
For a list of project specific options supported:
|
||||
|
||||
cat meson_options.txt
|
||||
|
||||
To set 1 or more project specific options:
|
||||
|
||||
meson --prefix=/path/to -Doption=value [-Dother=value2] [...] . build
|
||||
|
||||
To display current configuration:
|
||||
|
||||
meson configure build
|
||||
|
||||
The above will only work after at least the following is done:
|
||||
|
||||
meson . build
|
||||
|
||||
** QUICK AND DIRTY HELP **
|
||||
--------------------------
|
||||
|
||||
How to clean out the build and config and start fresh:
|
||||
|
||||
rm -rf build
|
||||
|
||||
How to make a dist tarball and check its build:
|
||||
(must do it from git tree clone and commit all changes to git first)
|
||||
|
||||
ninja -C build dist
|
||||
|
||||
How to change prefix:
|
||||
|
||||
meson --prefix=/path/to/prefix . build
|
||||
|
||||
How to install in a specific destination directory for packaging:
|
||||
|
||||
DESTDIR=/path/to/destdir ninja -C build install
|
||||
|
||||
How to build with verbose output (full commands run):
|
||||
|
||||
ninja -C build -v
|
|
@ -0,0 +1,47 @@
|
|||
Enlightenment
|
||||
-------------
|
||||
|
||||
Please report bugs and submit patches at https://phab.enlightenment.org
|
||||
|
||||
REQUIREMENTS
|
||||
------------
|
||||
|
||||
Must:
|
||||
* efl
|
||||
* libpam (On Linux)
|
||||
|
||||
Highly suggested:
|
||||
* libexif (exif metadata display support)
|
||||
* evas_generic_loaders (All loaders)
|
||||
* bluez5 (BT support and l2ping tool)
|
||||
* connman
|
||||
* bc (For everything calculator)
|
||||
* pulseaudio
|
||||
* acpid (Unless your system doesn't have ACPI at all)
|
||||
* packagekit (For packagekit module updates status)
|
||||
* udisks2
|
||||
* gdb (If you want automatic bactraces in ~/.e-crashdump.txt)
|
||||
|
||||
COMPILING AND INSTALLING
|
||||
------------------------
|
||||
|
||||
For sample configuration options please look in the ./confs/ directory
|
||||
for scripts that pass in commonly used options.
|
||||
|
||||
Please see the INSTALL file: https://git.enlightenment.org/core/enlightenment.git/tree/INSTALL
|
||||
|
||||
NOTE: Users of DR16 will need to rename the $prefix/bin/enlightenment
|
||||
file prior to installing this release or it will be overwritten.
|
||||
|
||||
NOTE: If you do not want security issues make sure sysactions.conf is in
|
||||
/etc/enlightenment (not PREFIX/etc/enlightenment) as this is the first place
|
||||
it looks at. This file is intended to be customized by packagers and
|
||||
system integrators to match your policies and scripts/tools.
|
||||
|
||||
NOTE: To enable wayland support (still considered experimental and not for
|
||||
regular end users) use the meson -Dwl=true option. To run enlightenment in
|
||||
wayland mode, just log on on ant 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.
|
||||
|
||||
|
225
README.md
|
@ -1,225 +0,0 @@
|
|||
![Enlightenment](/data/readme/enlightenment.png)
|
||||
# Enlightenment
|
||||
|
||||
![Screenshot](/data/readme/screenshot.png)
|
||||
|
||||
-----
|
||||
|
||||
*Please report bugs/issues at*
|
||||
[git.enlightenment.org](https://git.enlightenment.org/enlightenment/enlightenment/issues)
|
||||
|
||||
-----
|
||||
|
||||
Enlightenment is a Window Manager, Compositor and basic "Desktop
|
||||
Shell". It replaces your GUI environment that runs your day to day
|
||||
graphical Desktop. It includes a built-in File Manager, Application
|
||||
Launcher, Shelves, Settings Dialogs, Menus, Audio Mixer Controls, Network
|
||||
Control front-end (for Connman), Battery Monitoring, CPU Frequency
|
||||
Controls, Screen Blanking and Backlight controls, Screenshotting and
|
||||
editing, Clock and Calendar, Temperature Guages, Mpris2 Music Controls,
|
||||
Packagekit Update Front-end, Bluetooth controls for BlueZ 5, Screen
|
||||
resolution and layout controls and much much more.
|
||||
|
||||
Enlightenment is one of the lowest resource environments around
|
||||
relative to its featureset.
|
||||
|
||||
Enlightenment is primarly developed for X11, but does have an
|
||||
experimental Wayland mode that will have issues, so only try it if
|
||||
you are adventurous or willing to work on it.
|
||||
|
||||
For more information please see
|
||||
[Enlightenment's About Page](https://www.enlightenment.org/about-enlightenment).
|
||||
|
||||
![Screenshot 2](/data/readme/screenshot2.png)
|
||||
![Screenshot 3](/data/readme/screenshot3.png)
|
||||
![Screenshot 4](/data/readme/screenshot4.png)
|
||||
![Screenshot 5](/data/readme/screenshot5.png)
|
||||
![Screenshot 6](/data/readme/screenshot6.png)
|
||||
|
||||
-----
|
||||
|
||||
Things that need doing:
|
||||
|
||||
[TODO](TODO.md)
|
||||
|
||||
-----
|
||||
|
||||
## Requirements
|
||||
|
||||
Must:
|
||||
|
||||
* [efl](https://git.enlightenment.org/enlightenment/efl)
|
||||
* libpam (Required on Linux, not BSD)
|
||||
|
||||
Highly suggested:
|
||||
|
||||
* libexif (exif metadata display support)
|
||||
* bluez5 (BT support and l2ping tool)
|
||||
* connman
|
||||
* bc (For everything calculator)
|
||||
* pulseaudio
|
||||
* acpid (Unless your system doesn't have ACPI at all)
|
||||
* packagekit (For packagekit module updates status)
|
||||
* udisks2
|
||||
* gdb (If you want automatic bactraces in ~/.e-crashdump.txt)
|
||||
|
||||
-----
|
||||
|
||||
## Compiling and Installing
|
||||
|
||||
Meson is the build system used for this project. For more information
|
||||
please see [mesonbuild.com](https://mesonbuild.com)
|
||||
|
||||
You will need normal build tooling installed such as a compiler (gcc
|
||||
or clang for example), pkg-config, ninja, any relevant package-dev or
|
||||
package-devel packages if your distribution splits out development
|
||||
headers (e.g. libc6-dev) etc.
|
||||
|
||||
Depending on where dependencies (like efl) are installed, you might have to
|
||||
set your `PKG_CONFIG_PATH` environment variable like:
|
||||
```sh
|
||||
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
|
||||
```
|
||||
|
||||
Also note that some distributions like to add extra arch directories
|
||||
to your library locations so you might have to have more like:
|
||||
```sh
|
||||
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig
|
||||
```
|
||||
|
||||
You will need to ensure that the destination library directory (e.g.
|
||||
`/usr/local/lib` is in your /etc/ld.so.conf or /etc/ld.so.conf.d/
|
||||
files and after installing anything that installs libraries you
|
||||
re-run `ldconfig`. Please see relevant documentation on ldconfig and
|
||||
ld.so.conf for your distribution.
|
||||
|
||||
You might also want to add the destination bin dir to your environment
|
||||
variable PATH (see documentation on your shell PATH variable) such as:
|
||||
```sh
|
||||
export PATH=/usr/local/bin:/usr/bin:/bin
|
||||
```
|
||||
|
||||
Normal compilation in /usr/local:
|
||||
```sh
|
||||
meson . build
|
||||
ninja -C build
|
||||
sudo ninja -C build install
|
||||
```
|
||||
|
||||
For meson build generic options:
|
||||
```sh
|
||||
meson --help
|
||||
```
|
||||
|
||||
For a list of project specific options supported:
|
||||
```sh
|
||||
cat meson_options.txt
|
||||
```
|
||||
|
||||
To set 1 or more project specific options:
|
||||
```sh
|
||||
meson --prefix=/path/to -Doption=value [-Dother=value2] [...] . build
|
||||
```
|
||||
|
||||
To display current configuration:
|
||||
```sh
|
||||
meson configure build
|
||||
```
|
||||
|
||||
The above will only work after at least the following is done:
|
||||
```sh
|
||||
meson . build
|
||||
```
|
||||
|
||||
### Quick build help
|
||||
|
||||
How to clean out the build and config and start fresh:
|
||||
```sh
|
||||
rm -rf build
|
||||
```
|
||||
|
||||
How to make a dist tarball and check its build:
|
||||
(must do it from git tree clone and commit all changes to git first)
|
||||
```sh
|
||||
ninja -C build dist
|
||||
```
|
||||
|
||||
How to change prefix:
|
||||
```sh
|
||||
meson --prefix=/path/to/prefix . build
|
||||
```
|
||||
|
||||
How to install in a specific destination directory for packaging:
|
||||
```sh
|
||||
DESTDIR=/path/to/destdir ninja -C build install
|
||||
```
|
||||
|
||||
How to build with verbose output (full commands run):
|
||||
```sh
|
||||
ninja -C build -v
|
||||
```
|
||||
-----
|
||||
|
||||
**NOTE:** Once Enlightenment is started by `enlightenment_start`, all
|
||||
output logs are put in `~/.e-log.log`. The previous log for the
|
||||
previous execution of Enlightenment will be moved to `~/.e-log.log.old`.
|
||||
|
||||
-----
|
||||
|
||||
**NOTE:** If you install enlightenment to the default compile prefix
|
||||
(`/usr/local`) then you might want to ensure the session file is
|
||||
accessible to your login manager (assuming you use one) by doing
|
||||
something like:
|
||||
|
||||
```sh
|
||||
sudo ln -s /usr/local/share/xsessions/enlightenment.desktop /usr/share/xsessions/enlightenment.desktop
|
||||
```
|
||||
|
||||
You can also just set up a custom launcher script. Edit the
|
||||
`~/.xinitrc` file in your home directory and have it have this content:
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
exec /usr/local/bin/enlightenment_start >& ~/.xsession-errors
|
||||
```
|
||||
|
||||
(`exec` tells the shell to replace itself with the following command
|
||||
and `>& ~/.xsession-errors` ensures all output is logged to the
|
||||
`~/.xsession-errors` file).
|
||||
|
||||
You may also want your `~/.xsession` file to be the same, so make a link:
|
||||
|
||||
```sh
|
||||
ln -s .xinitrc .xsession
|
||||
```
|
||||
|
||||
This assumes `/usr/local` as well and just modify based on your
|
||||
install prefix location.
|
||||
|
||||
If you do not use a login manager you can just log into a text console
|
||||
and run `startx` after the above `.xinitrc` file is set up.
|
||||
|
||||
-----
|
||||
|
||||
**NOTE:** If you do not want security issues make sure `sysactions.conf` is in
|
||||
`/etc/enlightenment` (not `PREFIX/etc/enlightenment`) as this is the first
|
||||
place it looks at. This file is intended to be customized by packagers and
|
||||
system integrators to match your policies and scripts/tools. This also
|
||||
applies to `system.conf` in the same directory.
|
||||
|
||||
-----
|
||||
|
||||
**NOTE:** To enable Wayland support (still considered experimental and not for
|
||||
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
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
TODO:
|
||||
* need a better "extra" that allows shot-module like sharing of:
|
||||
* themes
|
||||
* wallpapers
|
||||
|
@ -50,9 +51,9 @@
|
|||
* bt tethering
|
||||
* usb tehtering
|
||||
* wifi tethering
|
||||
* fix vkbd to work in wl - e_kbd_send.c - look at ecore_wl2_input.c
|
||||
* clean up some old actions that are handled better by newer ones
|
||||
* like suspend intelligently is better than regular suspend but
|
||||
* S fix vkbd to work in wl - e_kbd_send.c - look at ecore_wl2_input.c
|
||||
* S clean up some old actions that are handled better by newer ones
|
||||
* S like suspend intelligently is better than regular suspend but
|
||||
suspend now is very explicit and worth keeping
|
||||
* clock - add event/alarm/appointment tracking and notifications etc.
|
||||
* this perhaps can be merged with the cron front-end
|
||||
|
@ -76,10 +77,12 @@
|
|||
* face auth (howdy / pam-face / pam-face-authentication / pam-facial-auth)
|
||||
* yubikey
|
||||
* usb drive (pam_usb)
|
||||
* support setting up fingerprint as auth (fprint-enroll)
|
||||
* support setting up smartcard as auth
|
||||
* support setting up face auth (howdy / pam-face / pam-face-authentication / pam-facial-auth)
|
||||
* support setting up yubikey as auth
|
||||
* support setting up usb drive for auth (pam_usb)
|
||||
* support fprint auth for polkit agent (ugh)
|
||||
* wifi/bt net: associate app/desktop(s) or actions to run when:
|
||||
* bt device comes or goes (alongside lock device feature)
|
||||
* wifi appears or disappears
|
||||
|
@ -243,10 +246,8 @@
|
|||
* display other devices in above list separately
|
||||
* handle string capacity values like Full, High, Normal, Low, Critical...
|
||||
* randr: get auto layout to handle screens laid out like:
|
||||
```
|
||||
[dp2-2][dp2-1] <- 2 external monitors
|
||||
[edp-1] <- laptop main display
|
||||
```
|
||||
* randr: when losing a zone/screen, put windows in purgatory and then have
|
||||
purgatory screens available via pager to drag onto a current screen,
|
||||
or the specific virtual desktops from purgator to be accessible even
|
||||
|
@ -292,15 +293,15 @@
|
|||
* look into libratbag too for gaming mouse stuff if its worth using it or
|
||||
just doing the same
|
||||
stuff ourselves as we will probably have to via libinput
|
||||
* some kind of game mode and detection that will do things like:
|
||||
* disable screen dimming/blanking
|
||||
* set cpu to max performance
|
||||
* lower priority/nice of non-game processes or even sigstop procs
|
||||
* disable notifications
|
||||
* explicit toggle and possible auto-detect of games running
|
||||
* S some kind of game mode and detection that will do things like:
|
||||
* S disable screen dimming/blanking
|
||||
* S set cpu to max performance
|
||||
* S lower priority/nice of non-game processes or even sigstop procs
|
||||
* S disable notifications
|
||||
* S explicit toggle and possible auto-detect of games running
|
||||
* per app environment launch config - allow different TZ, LOCALE etc.
|
||||
per app and set up env appropriately
|
||||
* apps - ability to flag apps as "single run" so launching again from
|
||||
* apps - ability to flag apps as "single run" so launchgin again from
|
||||
menu/ibar will just focus the current window/jump to it etc.
|
||||
* back-end e system process for monitoring/polling and launching etc.
|
||||
* split e up into front vs back-end with back-end doing things like
|
||||
|
@ -322,6 +323,7 @@
|
|||
* need to allow a CONT every now and again to unblock buffers
|
||||
* set backlight and dim timeout per powersave level
|
||||
* battery - set powersave levels based on ac or battery level
|
||||
* efl: flat theme redo
|
||||
* efl/eo: start using efl loop as core loop
|
||||
* begin to move some login out into efl threads+loops
|
||||
* to change ui - callsync/async back to ui/main loop
|
||||
|
@ -332,6 +334,12 @@
|
|||
* have edje object stash
|
||||
* mixer: improve ui in emixer
|
||||
* emixer - support selecting recording dev for apps like pavucontrol
|
||||
* look at showing vu bars per recoridng or maybe output devices
|
||||
* offer ability to show vu output in mixer gadget
|
||||
* weather
|
||||
* bring in forecasts into core e
|
||||
* forecasts will due feb 2021. yahoo shutting down free api.
|
||||
given all the changes needed to do a new api...
|
||||
may as well write a whole new weather gadget.
|
||||
* free api:
|
||||
* https://api.met.no/weatherapi/locationforecast/2.0/documentation
|
||||
* a dependency of this (so we can provide lat/lon)
|
|
@ -58,8 +58,7 @@ 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" uchar: 0;
|
||||
value "no_state_hidden_desktop" uchar: 0;
|
||||
value "winlist_list_no_miniatures" int: 0;
|
||||
value "maximize_policy" int: 49;
|
||||
value "allow_manip" int: 0;
|
||||
value "border_fix_on_shelf_toggle" int: 0;
|
||||
|
@ -140,8 +139,6 @@ 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;
|
||||
|
@ -149,7 +146,6 @@ 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;
|
||||
|
|
|
@ -54,8 +54,7 @@ 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" uchar: 0;
|
||||
value "no_state_hidden_desktop" uchar: 0;
|
||||
value "winlist_list_no_miniatures" int: 0;
|
||||
value "maximize_policy" int: 50;
|
||||
value "allow_manip" int: 0;
|
||||
value "border_fix_on_shelf_toggle" int: 0;
|
||||
|
@ -138,8 +137,6 @@ 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;
|
||||
|
@ -147,7 +144,6 @@ 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;
|
||||
|
|
|
@ -54,8 +54,7 @@ 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" uchar: 0;
|
||||
value "no_state_hidden_desktop" uchar: 0;
|
||||
value "winlist_list_no_miniatures" int: 0;
|
||||
value "maximize_policy" int: 50;
|
||||
value "allow_manip" int: 0;
|
||||
value "border_fix_on_shelf_toggle" int: 0;
|
||||
|
@ -139,15 +138,12 @@ 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;
|
||||
|
|
|
@ -2,8 +2,7 @@ install_data([ 'enlightenment.png',
|
|||
'test.png',
|
||||
'test.jpg',
|
||||
'test.edj',
|
||||
'test.svg',
|
||||
'wayland.png'
|
||||
'test.svg'
|
||||
],
|
||||
install_dir: join_paths(dir_data, 'enlightenment/data/images')
|
||||
)
|
||||
|
|
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 552 KiB |
Before Width: | Height: | Size: 1.3 MiB |
Before Width: | Height: | Size: 772 KiB |
Before Width: | Height: | Size: 211 KiB |
|
@ -1,5 +1,5 @@
|
|||
[Desktop Entry]
|
||||
Type=XSession
|
||||
Type=Application
|
||||
Name=Enlightenment
|
||||
Name[ca]=Enlightenment
|
||||
Name[de]=Enlightenment
|
|
@ -1,2 +1,17 @@
|
|||
subdir('x')
|
||||
subdir('wl')
|
||||
desktop_config = configuration_data()
|
||||
desktop_config.set('prefix', dir_prefix)
|
||||
desktop_config.set('VERSION', e_version_rev)
|
||||
e_desktop = configure_file(input : 'enlightenment.desktop.in',
|
||||
output : 'enlightenment.desktop',
|
||||
configuration: desktop_config
|
||||
)
|
||||
|
||||
if config_h.has('HAVE_WAYLAND') == true
|
||||
install_data(e_desktop,
|
||||
install_dir : join_paths(dir_data, 'wayland-sessions'))
|
||||
endif
|
||||
|
||||
if config_h.has('HAVE_WAYLAND_ONLY') == false
|
||||
install_data(e_desktop,
|
||||
install_dir : join_paths(dir_data, 'xsessions'))
|
||||
endif
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Enlightenment (Wayland)
|
||||
Name[ca]=Enlightenment (Wayland)
|
||||
Name[de]=Enlightenment (Wayland)
|
||||
Name[el]=Enlightenment (Wayland)
|
||||
Name[eo]=Enlightenment (Wayland)
|
||||
Name[fi]=Enlightenment (Wayland)
|
||||
Name[fr]=Enlightenment (Wayland)
|
||||
Name[gl]=Enlightenment (Wayland)
|
||||
Name[ja]=Enlightenment (Wayland)
|
||||
Name[ko]=Enlightenment (Wayland)
|
||||
Name[ms]=Enlightenment (Wayland)
|
||||
Name[pl]=Enlightenment (Wayland)
|
||||
Name[ru]=Enlightenment (Wayland)
|
||||
Name[sr]=Просвећење (Wayland)
|
||||
Name[tr]=Enlightenment (Wayland)
|
||||
Comment=Log in using Enlightenment (Version @VERSION@)
|
||||
Comment[ca]=Iniciar sessió amb Enlightenment (Versió @VERSION@)
|
||||
Comment[da]=Log ind med Enlightenment (Version @VERSION@)
|
||||
Comment[de]=Anmelden und Enlightenment verwenden (Version @VERSION@)
|
||||
Comment[el]=Είσοδος με το Enlightenment (Έκδοση @VERSION@)
|
||||
Comment[eo]=Ensaluti pere de Enlightenment (Versio @VERSION@)
|
||||
Comment[es]=Iniciar sesión usando Enlightenment (Versión @VERSION@)
|
||||
Comment[fi]=Kirjaudu käyttäen Enlightenmentiä (versio @VERSION@)
|
||||
Comment[fr]=Ouvrir une session Enlightenment (Version @VERSION@)
|
||||
Comment[gl]=Iniciar sesión usando Enlightenment (Versión @VERSION@)
|
||||
Comment[it]=Accedi con Enlightenment (Versione @VERSION@)
|
||||
Comment[ko]=Enlightenment 로그인(버전 @VERSION@)
|
||||
Comment[ms]=Daftar masuk menggunakan Enligtenment (Versi @VERSION@)
|
||||
Comment[pt]=Iniciar sessão no Enlightenment (Versão @VERSION@)
|
||||
Comment[ru]=Войти используя Enlightenment (Версия @VERSION@)
|
||||
Comment[sr]=Пријавите се за коришћење Просвећења (издања @VERSION@)
|
||||
Comment[tr]=Enlightenment kullanarak giriş yaın (Version @VERSION@)
|
||||
Icon=@prefix@/share/enlightenment/data/images/enlightenment.png
|
||||
TryExec=@prefix@/bin/enlightenment_start
|
||||
Exec=env E_WL_FORCE=drm E_COMP_ENGINE=gl @prefix@/bin/enlightenment_start
|
||||
DesktopNames=Enlightenment
|
|
@ -1,12 +0,0 @@
|
|||
desktop_config = configuration_data()
|
||||
desktop_config.set('prefix', dir_prefix)
|
||||
desktop_config.set('VERSION', e_version_rev)
|
||||
e_desktop = configure_file(
|
||||
input : 'enlightenment.desktop.in',
|
||||
output : 'enlightenment.desktop',
|
||||
configuration : desktop_config)
|
||||
|
||||
if config_h.has('HAVE_WAYLAND') == true
|
||||
install_data(e_desktop,
|
||||
install_dir : join_paths(dir_data, 'wayland-sessions'))
|
||||
endif
|
|
@ -1,12 +0,0 @@
|
|||
desktop_config = configuration_data()
|
||||
desktop_config.set('prefix', dir_prefix)
|
||||
desktop_config.set('VERSION', e_version_rev)
|
||||
e_desktop = configure_file(
|
||||
input : 'enlightenment.desktop.in',
|
||||
output : 'enlightenment.desktop',
|
||||
configuration : desktop_config)
|
||||
|
||||
if config_h.has('HAVE_WAYLAND_ONLY') == false
|
||||
install_data(e_desktop,
|
||||
install_dir : join_paths(dir_data, 'xsessions'))
|
||||
endif
|
10
meson.build
|
@ -1,6 +1,6 @@
|
|||
##### project
|
||||
project('enlightenment', 'c',
|
||||
version : '0.26.99',
|
||||
version : '0.25.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.27.0'
|
||||
efl_version = '>= 1.26.0'
|
||||
|
||||
add_global_arguments('-DHAVE_CONFIG_H=1', language: 'c')
|
||||
dir_prefix = get_option('prefix')
|
||||
|
@ -83,11 +83,6 @@ 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')
|
||||
|
@ -298,7 +293,6 @@ 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)
|
||||
|
|
|
@ -132,10 +132,6 @@ 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,
|
||||
|
|
|
@ -18,7 +18,6 @@ hr
|
|||
hu
|
||||
it
|
||||
ja
|
||||
ka
|
||||
km
|
||||
ko
|
||||
lt
|
||||
|
|
20838
po/fr_CH.po
19937
po/pt_BR.po
19726
po/zh_CN.po
19125
po/zh_TW.po
|
@ -23,7 +23,7 @@ e_about_new(void)
|
|||
snprintf
|
||||
(buf, sizeof(buf), "%s%s",
|
||||
_(
|
||||
"<title>Copyright © 2000-2024, by the Enlightenment "
|
||||
"<title>Copyright © 2000-2022, by the Enlightenment "
|
||||
"Development Team</><ps/>"
|
||||
"<ps/>"
|
||||
"We hope you enjoy using this software as much as we enjoyed "
|
||||
|
|
|
@ -27,9 +27,6 @@ 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)
|
||||
{
|
||||
|
@ -48,17 +45,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 >= MAX_BL_DIFF
|
||||
(fabs(bd->expected_val - bd->val) >= MAX_BL_DIFF) &&
|
||||
// and we retried < SET_RETRIES times
|
||||
(bd->retries < SET_RETRIES) &&
|
||||
// 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) &&
|
||||
(_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.3, _backlight_retry_timer_cb, bd);
|
||||
bd->retry_timer = ecore_timer_add(0.1, _backlight_retry_timer_cb, bd);
|
||||
} // or give up
|
||||
else bd->retries = 0;
|
||||
}
|
||||
|
@ -76,10 +73,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) >= MAX_BL_DIFF)
|
||||
if (fabs(fval - bd->val) >= DBL_EPSILON)
|
||||
{
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
|
@ -100,10 +97,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) >= MAX_BL_DIFF) || (val == -1))
|
||||
if ((fabs(fval - bd->val) >= DBL_EPSILON) || (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);
|
||||
}
|
||||
}
|
||||
|
@ -794,7 +791,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;
|
||||
}
|
||||
|
|
|
@ -586,8 +586,6 @@ _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--;
|
||||
|
@ -2298,29 +2296,6 @@ _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
|
||||
|
|
|
@ -302,7 +302,6 @@ struct E_Client
|
|||
|
||||
unsigned char ignore_first_unmap;
|
||||
E_Pointer_Mode resize_mode;
|
||||
Ecore_Timer *ignore_first_unmap_clear_timer;
|
||||
|
||||
struct
|
||||
{
|
||||
|
|
|
@ -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) || ((cw->ec) && (cw->ec->shaped)))
|
||||
if (cw->input_objs)
|
||||
evas_object_pass_events_set(cw->obj, 1);
|
||||
else
|
||||
evas_object_pass_events_set(cw->obj, 0);
|
||||
|
@ -972,7 +972,7 @@ _e_comp_object_pixels_get(void *data, Evas_Object *obj)
|
|||
}
|
||||
if (e_object_is_del(E_OBJECT(ec))) return;
|
||||
/* shaped clients get precise mouse events to handle transparent pixels */
|
||||
evas_object_precise_is_inside_set(cw->obj, ec->shaped);
|
||||
evas_object_precise_is_inside_set(cw->obj, ec->shaped || ec->shaped_input);
|
||||
|
||||
//INF("%p PX(%dx%d) EC(%dx%d) CW(%dx%d)", ec, pw, ph, ec->w, ec->h, cw->w, cw->h);
|
||||
//e_comp_object_frame_wh_adjust(cw->smart_obj, pw, ph, &pw, &ph);
|
||||
|
|
|
@ -534,12 +534,59 @@ _e_comp_wl_evas_cb_multi_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *o
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_e_comp_wl_client_priority_adjust(int pid, int set, int adj, Eina_Bool use_adj, Eina_Bool adj_child, Eina_Bool do_child)
|
||||
{
|
||||
Eina_List *files;
|
||||
char *file, buff[PATH_MAX];
|
||||
FILE *f;
|
||||
int pid2, ppid;
|
||||
int num_read;
|
||||
int n;
|
||||
|
||||
if (use_adj)
|
||||
n = (getpriority(PRIO_PROCESS, pid) + adj);
|
||||
else
|
||||
n = set;
|
||||
|
||||
setpriority(PRIO_PROCESS, pid, n);
|
||||
|
||||
if (adj_child)
|
||||
use_adj = EINA_TRUE;
|
||||
|
||||
if (!do_child) return;
|
||||
|
||||
files = ecore_file_ls("/proc");
|
||||
EINA_LIST_FREE(files, file)
|
||||
{
|
||||
if (!isdigit(file[0]))
|
||||
continue;
|
||||
|
||||
snprintf(buff, sizeof(buff), "/proc/%s/stat", file);
|
||||
if ((f = fopen(buff, "r")))
|
||||
{
|
||||
pid2 = -1;
|
||||
ppid = -1;
|
||||
num_read = fscanf(f, "%i %*s %*s %i %*s", &pid2, &ppid);
|
||||
fclose(f);
|
||||
if (num_read == 2 && ppid == pid)
|
||||
_e_comp_wl_client_priority_adjust(pid2, set,
|
||||
adj, use_adj,
|
||||
adj_child, do_child);
|
||||
}
|
||||
|
||||
free(file);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_e_comp_wl_client_priority_raise(E_Client *ec)
|
||||
{
|
||||
if (ec->netwm.pid <= 0) return;
|
||||
if (ec->netwm.pid == getpid()) return;
|
||||
e_pid_nice_priority_fg(ec->netwm.pid);
|
||||
_e_comp_wl_client_priority_adjust(ec->netwm.pid,
|
||||
e_config->priority - 1, -1,
|
||||
EINA_FALSE, EINA_TRUE, EINA_FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -547,7 +594,8 @@ _e_comp_wl_client_priority_normal(E_Client *ec)
|
|||
{
|
||||
if (ec->netwm.pid <= 0) return;
|
||||
if (ec->netwm.pid == getpid()) return;
|
||||
e_pid_nice_priority_bg(ec->netwm.pid);
|
||||
_e_comp_wl_client_priority_adjust(ec->netwm.pid, e_config->priority, 1,
|
||||
EINA_FALSE, EINA_TRUE, EINA_FALSE);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -2881,7 +2929,7 @@ disp_err:
|
|||
}
|
||||
|
||||
static Eina_Bool
|
||||
_e_comp_wl_desklock_show(Eina_Bool immediate EINA_UNUSED)
|
||||
_e_comp_wl_desklock_show(void)
|
||||
{
|
||||
return e_comp_grab_input(1, 1);
|
||||
}
|
||||
|
|
|
@ -962,7 +962,7 @@ _e_comp_wl_clipboard_create(void)
|
|||
E_API void
|
||||
e_comp_wl_data_device_send_enter(E_Client *ec)
|
||||
{
|
||||
struct wl_resource *data_device_res = NULL, *offer_res = NULL;
|
||||
struct wl_resource *data_device_res, *offer_res;
|
||||
uint32_t serial;
|
||||
int x, y;
|
||||
|
||||
|
|
|
@ -77,7 +77,6 @@ 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;
|
||||
|
||||
|
@ -658,6 +657,58 @@ _e_comp_x_add_fail_job(void *d EINA_UNUSED)
|
|||
"GPU to use OpenGL with compositing."));
|
||||
}
|
||||
|
||||
static void
|
||||
_pri_adj(int pid, int set, int adj, Eina_Bool use_adj, Eina_Bool adj_children, Eina_Bool do_children)
|
||||
{
|
||||
int newpri = set;
|
||||
|
||||
if (use_adj) newpri = getpriority(PRIO_PROCESS, pid) + adj;
|
||||
setpriority(PRIO_PROCESS, pid, newpri);
|
||||
// shouldn't need to do this as default ionice class is "none" (0), and
|
||||
// this inherits io priority FROM nice level
|
||||
// ioprio_set(IOPRIO_WHO_PROCESS, pid,
|
||||
// IOPRIO_PRIO_VALUE(2, 5));
|
||||
if (do_children)
|
||||
{
|
||||
Eina_List *files;
|
||||
char *file, buf[PATH_MAX];
|
||||
FILE *f;
|
||||
int pid2, ppid;
|
||||
|
||||
// yes - this is /proc specific... so this may not work on some
|
||||
// os's - works on linux. too bad for others.
|
||||
files = ecore_file_ls("/proc");
|
||||
EINA_LIST_FREE(files, file)
|
||||
{
|
||||
if (isdigit(file[0]))
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "/proc/%s/stat", file);
|
||||
f = fopen(buf, "r");
|
||||
if (f)
|
||||
{
|
||||
pid2 = -1;
|
||||
ppid = -1;
|
||||
if (fscanf(f, "%i %*s %*s %i %*s", &pid2, &ppid) == 2)
|
||||
{
|
||||
fclose(f);
|
||||
if (ppid == pid)
|
||||
{
|
||||
if (adj_children)
|
||||
_pri_adj(pid2, set, adj, EINA_TRUE,
|
||||
adj_children, do_children);
|
||||
else
|
||||
_pri_adj(pid2, set, adj, use_adj,
|
||||
adj_children, do_children);
|
||||
}
|
||||
}
|
||||
else fclose(f);
|
||||
}
|
||||
}
|
||||
free(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static E_Client *
|
||||
_e_comp_x_client_find_by_alarm(Ecore_X_Sync_Alarm al)
|
||||
{
|
||||
|
@ -902,7 +953,12 @@ _e_comp_x_client_pri_raise(E_Client *ec)
|
|||
{
|
||||
if (ec->netwm.pid <= 0) return;
|
||||
if (ec->netwm.pid == getpid()) return;
|
||||
e_pid_nice_priority_fg(ec->netwm.pid);
|
||||
_pri_adj(ec->netwm.pid,
|
||||
e_config->priority - 1, -1, EINA_FALSE,
|
||||
// EINA_TRUE, EINA_TRUE);
|
||||
EINA_TRUE, EINA_FALSE);
|
||||
// printf("WIN: pid %i, title %s (HI!!!!!!!!!!!!!!!!!!)\n",
|
||||
// ec->netwm.pid, e_client_util_name_get(ec));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -910,7 +966,12 @@ _e_comp_x_client_pri_norm(E_Client *ec)
|
|||
{
|
||||
if (ec->netwm.pid <= 0) return;
|
||||
if (ec->netwm.pid == getpid()) return;
|
||||
e_pid_nice_priority_bg(ec->netwm.pid);
|
||||
_pri_adj(ec->netwm.pid,
|
||||
e_config->priority, 1, EINA_FALSE,
|
||||
// EINA_TRUE, EINA_TRUE);
|
||||
EINA_TRUE, EINA_FALSE);
|
||||
// printf("WIN: pid %i, title %s (NORMAL)\n",
|
||||
// ec->netwm.pid, e_client_util_name_get(ec));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -3439,41 +3500,6 @@ _e_comp_x_hook_client_post_new_client(void *d EINA_UNUSED, E_Client *ec)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_e_comp_x_frame_extents_adjust(E_Client *ec, int exl, int exr, int ext, int exb)
|
||||
{
|
||||
unsigned int extentscurrent;
|
||||
unsigned int extentsall = exl | exr | ext | exb;
|
||||
int insl = 0, insr = 0, inst = 0, insb = 0;
|
||||
|
||||
e_comp_object_frame_geometry_get(ec->frame, &insl, &insr, &inst, &insb);
|
||||
extentscurrent = insl | insr | inst | insb;
|
||||
|
||||
extentsall = !!extentsall;
|
||||
extentscurrent = !!extentscurrent;
|
||||
if ((!e_comp_object_frame_exists(ec->frame)) &&
|
||||
(( extentsall && extentscurrent) ||
|
||||
(!extentsall && extentscurrent) ||
|
||||
( extentsall && !extentscurrent)))
|
||||
{
|
||||
e_comp_object_frame_geometry_set(ec->frame, -exl, -exr, -ext, -exb);
|
||||
if (ec->override &&
|
||||
(ec->x == ec->comp_data->initial_attributes.x) &&
|
||||
(ec->y == ec->comp_data->initial_attributes.y))
|
||||
e_comp_object_frame_xy_adjust(ec->frame, ec->x, ec->y, &ec->x, &ec->y);
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -3526,9 +3552,6 @@ _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);
|
||||
|
||||
|
@ -4855,18 +4878,34 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec)
|
|||
*/
|
||||
if (count >= 4)
|
||||
{
|
||||
// printf("GTK-FRM: get %i %i %i %i\n",
|
||||
// extents[0], extents[1], extents[2], extents[3]);
|
||||
_e_comp_x_frame_extents_adjust
|
||||
(ec, extents[0], extents[1], extents[2], extents[3]);
|
||||
unsigned int extentscurrent;
|
||||
unsigned int extentsall =
|
||||
extents[0] | extents[1] | extents[2] | extents[3];
|
||||
int insl = 0, insr = 0, inst = 0, insb = 0;
|
||||
e_comp_object_frame_geometry_get(ec->frame, &insl, &insr,
|
||||
&inst, &insb);
|
||||
extentscurrent = insl | insr | inst | insb;
|
||||
|
||||
extentsall = !!extentsall;
|
||||
extentscurrent = !!extentscurrent;
|
||||
if ((!e_comp_object_frame_exists(ec->frame)) &&
|
||||
(( extentsall && extentscurrent) ||
|
||||
(!extentsall && extentscurrent) ||
|
||||
( extentsall && !extentscurrent)))
|
||||
{
|
||||
e_comp_object_frame_geometry_set(ec->frame,
|
||||
-extents[0],
|
||||
-extents[1],
|
||||
-extents[2],
|
||||
-extents[3]);
|
||||
if (ec->override &&
|
||||
(ec->x == ec->comp_data->initial_attributes.x) &&
|
||||
(ec->y == ec->comp_data->initial_attributes.y))
|
||||
e_comp_object_frame_xy_adjust(ec->frame, ec->x, ec->y, &ec->x, &ec->y);
|
||||
}
|
||||
}
|
||||
free(extents);
|
||||
}
|
||||
else
|
||||
{
|
||||
// printf("GTK-FRM: get fail\n");
|
||||
_e_comp_x_frame_extents_adjust(ec, 0, 0, 0, 0);
|
||||
}
|
||||
cd->fetch_gtk_frame_extents = 0;
|
||||
}
|
||||
ec->changes.prop = 0;
|
||||
|
@ -5326,7 +5365,6 @@ _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
|
||||
|
@ -5381,7 +5419,6 @@ _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;
|
||||
|
@ -5762,9 +5799,6 @@ _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);
|
||||
|
@ -5827,7 +5861,7 @@ _e_comp_x_desklock_hide(void)
|
|||
}
|
||||
|
||||
static Eina_Bool
|
||||
_e_comp_x_desklock_show(Eina_Bool immedate EINA_UNUSED)
|
||||
_e_comp_x_desklock_show(void)
|
||||
{
|
||||
if (!e_comp_grab_input(1, 1))
|
||||
{
|
||||
|
@ -6034,13 +6068,6 @@ _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)
|
||||
{
|
||||
|
@ -6208,8 +6235,6 @@ 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();
|
||||
|
@ -6220,11 +6245,6 @@ 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);
|
||||
|
|
|
@ -144,44 +144,11 @@ _handle_dev_prop(int dev_slot, const char *dev, const char *prop, Device_Flags d
|
|||
}
|
||||
free(val);
|
||||
}
|
||||
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);
|
||||
}
|
||||
// not for now - default
|
||||
// else if (!strcmp(prop, "libinput Accel Profile Enabled"))
|
||||
// {
|
||||
// // 1 bool, 0 = adaptive, 1 = flat
|
||||
// }
|
||||
// do via button mapping for now - not sure about this evdev can't do this
|
||||
// else if (!strcmp(prop, "libinput Left Handed Enabled"))
|
||||
// {
|
||||
|
|
|
@ -20,7 +20,6 @@ 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 =
|
||||
{
|
||||
|
@ -502,168 +501,9 @@ e_comp_x_randr_shutdown(void)
|
|||
E_FREE_LIST(handlers, ecore_event_handler_del);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_comp_xrandr_cmd(void)
|
||||
E_API void
|
||||
e_comp_x_randr_config_apply(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();
|
||||
|
@ -708,13 +548,12 @@ _e_comp_xrandr_ecore_x(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(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 *));
|
||||
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 *));
|
||||
|
||||
// decide which outputs get which crtcs
|
||||
EINA_LIST_FOREACH(e_randr2->screens, l, s)
|
||||
|
@ -730,7 +569,7 @@ _e_comp_xrandr_ecore_x(void)
|
|||
{
|
||||
if (s->config.priority > top_priority)
|
||||
top_priority = s->config.priority;
|
||||
for (i = 0; i < outputs_num; i++)
|
||||
for (i = 0; i < crtcs_num; i++)
|
||||
{
|
||||
if (!outconf[i])
|
||||
{
|
||||
|
@ -757,18 +596,18 @@ _e_comp_xrandr_ecore_x(void)
|
|||
}
|
||||
}
|
||||
numout = 0;
|
||||
for (i = 0; i < outputs_num; i++)
|
||||
for (i = 0; i < crtcs_num; i++)
|
||||
{
|
||||
if (outconf[i]) numout++;
|
||||
}
|
||||
if (numout)
|
||||
{
|
||||
Ecore_X_Rectangle *scrs = alloca(numout * sizeof(Ecore_X_Rectangle));
|
||||
Ecore_X_Rectangle *scrs = alloca(crtcs_num * sizeof(Ecore_X_Rectangle));
|
||||
int scrs_num;
|
||||
|
||||
scrs_num = 0;
|
||||
// set up a crtc to drive each output (or not)
|
||||
for (i = 0; i < numout; i++)
|
||||
for (i = 0; i < crtcs_num; i++)
|
||||
{
|
||||
// XXX: find clones and set them as outputs in an array
|
||||
if (outconf[i])
|
||||
|
@ -798,7 +637,7 @@ _e_comp_xrandr_ecore_x(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,
|
||||
|
@ -850,7 +689,7 @@ _e_comp_xrandr_ecore_x(void)
|
|||
free(outputs);
|
||||
free(crtcs);
|
||||
|
||||
printf("RRR: set vsize2: %ix%i\n", nw, nh);
|
||||
printf("RRR: set vsize: %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;
|
||||
|
@ -865,6 +704,7 @@ _e_comp_xrandr_ecore_x(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
|
||||
|
@ -872,22 +712,6 @@ _e_comp_xrandr_ecore_x(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)
|
||||
{
|
||||
|
|
|
@ -122,24 +122,6 @@ _e_config_profile_name_get(Eet_File *ef)
|
|||
s = eina_stringshare_add_length(data, data_len);
|
||||
free(data);
|
||||
}
|
||||
if (s)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
char buf2[PATH_MAX];
|
||||
|
||||
e_user_dir_snprintf(buf, sizeof(buf), "config/%s", s);
|
||||
if (!ecore_file_is_dir(buf))
|
||||
{
|
||||
snprintf(buf2, sizeof(buf2), "config/%s", s);
|
||||
e_prefix_data_concat_static(buf, buf2);
|
||||
if (!ecore_file_is_dir(buf))
|
||||
{
|
||||
printf("CF: warning - profile [%s] dir does not exist in user or system dirs\n", s);
|
||||
eina_stringshare_del(s);
|
||||
s = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
|
@ -190,7 +172,7 @@ _e_config_pending_file_del(const char *path)
|
|||
|
||||
eina_hash_del(_e_config_pending_files, path, ef);
|
||||
eina_lock_release(&_e_config_pending_files_lock);
|
||||
err = eet_sync_sync(ef);
|
||||
err = eet_close(ef);
|
||||
switch (err)
|
||||
{
|
||||
case EET_ERROR_NONE:
|
||||
|
@ -255,7 +237,6 @@ _e_config_pending_file_del(const char *path)
|
|||
erstr = _("The error is unknown to Enlightenment.");
|
||||
break;
|
||||
}
|
||||
eet_close(ef);
|
||||
if (!ok) printf("CF: Write Error: %s\n", erstr);
|
||||
}
|
||||
else
|
||||
|
@ -750,7 +731,6 @@ _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); /**/
|
||||
|
@ -856,10 +836,8 @@ _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);
|
||||
|
@ -867,7 +845,6 @@ _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);
|
||||
|
@ -1068,24 +1045,19 @@ e_config_init(void)
|
|||
|
||||
for (i = 1; i <= _e_config_revisions; i++)
|
||||
{
|
||||
e_user_dir_snprintf(buf, sizeof(buf), "config/profile.cfg.%i", i);
|
||||
e_user_dir_snprintf(buf, sizeof(buf), "config/profile.%i.cfg", i);
|
||||
ef = eet_open(buf, EET_FILE_MODE_READ);
|
||||
if (ef)
|
||||
{
|
||||
printf("CF: warning - falling back to %s\n", buf);
|
||||
_e_config_profile = _e_config_profile_name_get(ef);
|
||||
eet_close(ef);
|
||||
ef = NULL;
|
||||
if (_e_config_profile) break;
|
||||
printf("CF: warning - fallback to %s can't read profile\n", buf);
|
||||
}
|
||||
else if (ecore_file_exists(buf))
|
||||
printf("CF: warning - fallback to %s failing to open\n", buf);
|
||||
}
|
||||
if (!_e_config_profile)
|
||||
{
|
||||
/* use system if no user profile config */
|
||||
printf("CF: fallback to system profile config file\n");
|
||||
e_prefix_data_concat_static(buf, "data/config/profile.cfg");
|
||||
ef = eet_open(buf, EET_FILE_MODE_READ);
|
||||
}
|
||||
|
@ -1095,8 +1067,6 @@ e_config_init(void)
|
|||
_e_config_profile = _e_config_profile_name_get(ef);
|
||||
eet_close(ef);
|
||||
ef = NULL;
|
||||
if (!_e_config_profile)
|
||||
printf("CF: warning - can't read profile\n");
|
||||
}
|
||||
if (!_e_config_profile)
|
||||
{
|
||||
|
@ -1805,14 +1775,6 @@ 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)
|
||||
|
@ -2213,21 +2175,16 @@ e_config_domain_load(const char *domain, E_Config_DD *edd)
|
|||
|
||||
for (i = 1; i <= _e_config_revisions; i++)
|
||||
{
|
||||
e_user_dir_snprintf(buf, sizeof(buf), "config/%s/%s.cfg.%i",
|
||||
e_user_dir_snprintf(buf, sizeof(buf), "config/%s/%s.%i.cfg",
|
||||
_e_config_profile, domain, i);
|
||||
ef = eet_open(buf, EET_FILE_MODE_READ);
|
||||
if (ef)
|
||||
{
|
||||
printf("CF: warning - falling back to %s\n", buf);
|
||||
data = eet_data_read(ef, edd, "config");
|
||||
eet_close(ef);
|
||||
if (data) return data;
|
||||
printf("CF: warning - fallback to %s can't read config\n", buf);
|
||||
}
|
||||
else if (ecore_file_exists(buf))
|
||||
printf("CF: warning - fallback to %s failing to open\n", buf);
|
||||
}
|
||||
printf("CF: fallback to system config config file for [%s]\n", domain);
|
||||
return e_config_domain_system_load(domain, edd);
|
||||
}
|
||||
|
||||
|
@ -2247,7 +2204,6 @@ e_config_domain_system_load(const char *domain, E_Config_DD *edd)
|
|||
eet_close(ef);
|
||||
return data;
|
||||
}
|
||||
printf("CF: system config load for %s failed\n", buf);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
|
|
@ -135,7 +135,6 @@ 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
|
||||
|
@ -246,15 +245,12 @@ 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
|
||||
|
|
|
@ -434,13 +434,16 @@ 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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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(EINA_TRUE))
|
||||
if (iface->show())
|
||||
{
|
||||
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(EINA_TRUE)) continue;
|
||||
if (!diface->show()) 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(EINA_FALSE))
|
||||
if (iface->show())
|
||||
{
|
||||
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(suspend)) goto fail;
|
||||
if (!show_cb()) goto fail;
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(e_comp->zones, l, zone)
|
||||
|
@ -278,28 +278,6 @@ _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);
|
||||
|
||||
|
@ -317,7 +295,7 @@ _desklock_show_internal(Eina_Bool suspend)
|
|||
|
||||
EINA_LIST_REVERSE_FOREACH(desklock_ifaces, l, iface)
|
||||
{
|
||||
success = iface->show(suspend);
|
||||
success = iface->show();
|
||||
if (success)
|
||||
{
|
||||
iface->active = EINA_TRUE;
|
||||
|
@ -340,7 +318,6 @@ _desklock_show_internal(Eina_Bool suspend)
|
|||
|
||||
if (getenv("E_START_MANAGER")) kill(getppid(), SIGUSR2);
|
||||
_e_desklock_state = EINA_TRUE;
|
||||
e_sys_locked_set(_e_desklock_state);
|
||||
e_bindings_disabled_set(1);
|
||||
e_screensaver_update();
|
||||
e_dpms_force_update();
|
||||
|
@ -409,7 +386,6 @@ _desklock_hide_internal(void)
|
|||
}
|
||||
|
||||
_e_desklock_state = EINA_FALSE;
|
||||
e_sys_locked_set(_e_desklock_state);
|
||||
e_bindings_disabled_set(0);
|
||||
ev = E_NEW(E_Event_Desklock, 1);
|
||||
ev->on = 0;
|
||||
|
@ -529,6 +505,8 @@ _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");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifdef E_TYPEDEFS
|
||||
|
||||
typedef struct _E_Event_Desklock E_Event_Desklock;
|
||||
typedef Eina_Bool (*E_Desklock_Show_Cb)(Eina_Bool immediate);
|
||||
typedef Eina_Bool (*E_Desklock_Show_Cb)(void);
|
||||
typedef void (*E_Desklock_Hide_Cb)(void);
|
||||
|
||||
typedef enum _E_Desklock_Background_Method {
|
||||
|
|
|
@ -593,7 +593,7 @@ _e_deskmirror_mirror_setup(Mirror *m)
|
|||
evas_object_pass_events_set(m->mirror, !m->ec);
|
||||
}
|
||||
if (m->ec) evas_object_data_set(m->mirror, "E_Client", m->ec);
|
||||
evas_object_precise_is_inside_set(m->mirror, m->ec && (m->ec->shaped));
|
||||
evas_object_precise_is_inside_set(m->mirror, m->ec && (m->ec->shaped || m->ec->shaped_input));
|
||||
e_layout_pack(m->sd->layout, m->mirror);
|
||||
_e_deskmirror_mirror_reconfigure(m);
|
||||
if (m->sd->handlers) // no handlers = we're setting up = there's no possible listeners
|
||||
|
|
|
@ -13,7 +13,6 @@ 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;
|
||||
|
@ -22,6 +21,10 @@ 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)
|
||||
{
|
||||
|
@ -32,7 +35,6 @@ 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;
|
||||
|
@ -40,15 +42,9 @@ 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);
|
||||
e_dpms_actual = enabled;
|
||||
}
|
||||
ecore_x_dpms_enabled_set(enabled);
|
||||
else
|
||||
{
|
||||
ecore_x_dpms_enabled_set(0);
|
||||
e_dpms_actual = EINA_FALSE;
|
||||
}
|
||||
ecore_x_dpms_enabled_set(0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -57,9 +53,9 @@ e_dpms_update(void)
|
|||
if (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;
|
||||
standby += STANDBY;
|
||||
suspend += SUSPEND;
|
||||
off += OFF;
|
||||
}
|
||||
if (_e_dpms_timeout_standby != standby)
|
||||
{
|
||||
|
@ -91,20 +87,13 @@ 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);
|
||||
e_dpms_actual = enabled;
|
||||
}
|
||||
ecore_x_dpms_enabled_set(enabled);
|
||||
else
|
||||
{
|
||||
ecore_x_dpms_enabled_set(0);
|
||||
e_dpms_actual = EINA_FALSE;
|
||||
}
|
||||
ecore_x_dpms_enabled_set(0);
|
||||
}
|
||||
#endif
|
||||
if (!enabled) return;
|
||||
|
@ -112,9 +101,9 @@ e_dpms_force_update(void)
|
|||
if (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;
|
||||
standby += STANDBY;
|
||||
suspend += SUSPEND;
|
||||
off += OFF;
|
||||
}
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return;
|
||||
|
@ -182,9 +171,9 @@ _e_dpms_off(void *d EINA_UNUSED)
|
|||
static Eina_Bool
|
||||
_e_dpms_screensaver_on()
|
||||
{
|
||||
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);
|
||||
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);
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,17 +3,11 @@
|
|||
#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
|
||||
|
|
|
@ -599,7 +599,6 @@ _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);
|
||||
|
||||
|
|
|
@ -597,11 +597,8 @@ e_hints_window_state_set(E_Client *ec)
|
|||
if (ec->netwm.state.skip_pager)
|
||||
state[num++] = ECORE_X_WINDOW_STATE_SKIP_PAGER;
|
||||
}
|
||||
if (!e_config->no_state_hidden_desktop)
|
||||
{
|
||||
if (ec->netwm.state.hidden)
|
||||
state[num++] = ECORE_X_WINDOW_STATE_HIDDEN;
|
||||
}
|
||||
if (ec->netwm.state.hidden)
|
||||
state[num++] = ECORE_X_WINDOW_STATE_HIDDEN;
|
||||
if (ec->netwm.state.fullscreen)
|
||||
state[num++] = ECORE_X_WINDOW_STATE_FULLSCREEN;
|
||||
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
"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",
|
|
@ -28,7 +28,6 @@
|
|||
#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"
|
||||
|
@ -156,7 +155,6 @@
|
|||
#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"
|
||||
|
|
|
@ -72,7 +72,6 @@ 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);
|
||||
|
@ -456,30 +455,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, 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);
|
||||
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);
|
||||
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"), 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);
|
||||
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);
|
||||
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, 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);
|
||||
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);
|
||||
e_widget_toolbook_page_append(otb, NULL, _("Settings"), o, 1, 1, 1, 1, 0.5, 0.0);
|
||||
e_widget_toolbook_page_show(otb, 0);
|
||||
|
||||
|
@ -502,19 +501,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, 0, netwm.name);
|
||||
STR_ENTRY(_("Icon Name"), 0, 1, netwm.icon_name);
|
||||
STR_ENTRY(_("Stacking"), 0, 2, netwm.stacking);
|
||||
STR_ENTRY(_("Name"), 0, 1, netwm.name);
|
||||
STR_ENTRY(_("Icon Name"), 0, 2, netwm.icon_name);
|
||||
STR_ENTRY(_("Stacking"), 0, 3, 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, 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);
|
||||
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);
|
||||
e_widget_toolbook_page_append(otb, NULL, _("Settings"), o, 1, 1, 1, 1, 0.5, 0.0);
|
||||
e_widget_toolbook_page_show(otb, 0);
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ struct _Main_Data
|
|||
E_Menu *enlightenment;
|
||||
E_Menu *config;
|
||||
E_Menu *lost_clients;
|
||||
E_Menu *inhibitors;
|
||||
};
|
||||
|
||||
/* local subsystem functions */
|
||||
|
@ -64,7 +63,6 @@ static void _e_int_menus_desk_item_cb(void *data, E_Menu *m, E_Menu_Item
|
|||
static void _e_int_menus_item_label_set(Efreet_Menu *entry, E_Menu_Item *mi);
|
||||
static Efreet_Menu *_e_int_menus_apps_thread_new(E_Menu *m, const char *dir);
|
||||
static Eina_Bool _e_int_menus_efreet_desktop_cache_update(void *d, int type, void *e);
|
||||
static void _e_int_menus_inhibit_cb(void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
//static void _e_int_menus_apps_drag_finished(E_Drag *drag, int dropped EINA_UNUSED);
|
||||
|
||||
/* local subsystem globals */
|
||||
|
@ -196,16 +194,6 @@ e_int_menus_main_new(void)
|
|||
e_util_menu_item_theme_icon_set(mi, "preferences-desktop");
|
||||
e_menu_item_submenu_set(mi, subm);
|
||||
|
||||
if ((e_msgbus_data) && (e_msgbus_data->screensaver_inhibits))
|
||||
{
|
||||
subm = e_int_menus_inhibitors_new();
|
||||
dat->inhibitors = subm;
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Blanking Block"));
|
||||
e_util_menu_item_theme_icon_set(mi, "preferences-screen-normal");
|
||||
e_menu_item_submenu_set(mi, subm);
|
||||
}
|
||||
|
||||
subm = e_int_menus_clients_new();
|
||||
dat->clients = subm;
|
||||
mi = e_menu_item_new(m);
|
||||
|
@ -430,46 +418,6 @@ e_int_menus_lost_clients_new(void)
|
|||
return m;
|
||||
}
|
||||
|
||||
static void
|
||||
_e_int_menus_inhibit_cb(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi EINA_UNUSED)
|
||||
{
|
||||
uintptr_t cookie = (uintptr_t)data;
|
||||
|
||||
e_msgbus_screensaver_inhibit_remove((unsigned int)cookie);
|
||||
}
|
||||
|
||||
E_API E_Menu *
|
||||
e_int_menus_inhibitors_new(void)
|
||||
{
|
||||
E_Menu *m;
|
||||
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)))
|
||||
return NULL;
|
||||
EINA_LIST_FOREACH(e_msgbus_data->screensaver_inhibits, l, inhibit)
|
||||
{
|
||||
mi = e_menu_item_new(m);
|
||||
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,
|
||||
(void *)((uintptr_t)inhibit->cookie));
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
||||
E_API E_Int_Menu_Augmentation *
|
||||
e_int_menus_menu_augmentation_add_sorted(const char *menu,
|
||||
const char *sort_key,
|
||||
|
@ -645,7 +593,6 @@ _e_int_menus_main_del_hook(void *obj)
|
|||
if (dat->lost_clients) e_object_del(E_OBJECT(dat->lost_clients));
|
||||
if (dat->enlightenment) e_object_del(E_OBJECT(dat->enlightenment));
|
||||
if (dat->config) e_object_del(E_OBJECT(dat->config));
|
||||
if (dat->inhibitors) e_object_del(E_OBJECT(dat->inhibitors));
|
||||
free(dat);
|
||||
|
||||
_e_int_menus_augmentation_del(m, _e_int_menus_augmentation_find("main/0"));
|
||||
|
|
|
@ -67,7 +67,6 @@ E_API E_Menu *e_int_menus_all_apps_new(void);
|
|||
E_API E_Menu *e_int_menus_config_new(void);
|
||||
E_API E_Menu *e_int_menus_lost_clients_new(void);
|
||||
E_API E_Menu *e_int_menus_shelves_new(void);
|
||||
E_API E_Menu *e_int_menus_inhibitors_new(void);
|
||||
|
||||
E_API E_Int_Menu_Augmentation *e_int_menus_menu_augmentation_add(const char *menu,
|
||||
void (*func_add) (void *data, E_Menu *m),
|
||||
|
|
|
@ -865,7 +865,11 @@ _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];
|
||||
|
|
|
@ -629,7 +629,6 @@ 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;
|
||||
|
||||
|
@ -699,11 +698,6 @@ 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())
|
||||
{
|
||||
|
@ -806,10 +800,6 @@ 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())
|
||||
{
|
||||
|
@ -904,7 +894,6 @@ main(int argc, char **argv)
|
|||
{
|
||||
e_desklock_show_manual(EINA_TRUE);
|
||||
e_screensaver_update();
|
||||
e_dpms_force_update();
|
||||
}
|
||||
|
||||
TS("Efreet Paths");
|
||||
|
@ -1127,7 +1116,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))
|
||||
{
|
||||
|
@ -1136,7 +1125,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;
|
||||
|
@ -1261,7 +1250,7 @@ _e_main_parse_arguments(int argc, char **argv)
|
|||
(!strcmp(argv[i], "--version")))
|
||||
{
|
||||
printf(_("Version: %s\n"), PACKAGE_VERSION);
|
||||
_e_main_shutdown(11);
|
||||
_e_main_shutdown(0);
|
||||
}
|
||||
else if ((!strcmp(argv[i], "-h")) ||
|
||||
(!strcmp(argv[i], "-help")) ||
|
||||
|
@ -1270,31 +1259,31 @@ _e_main_parse_arguments(int argc, char **argv)
|
|||
printf
|
||||
(_(
|
||||
"Options:\n"
|
||||
" -display DISPLAY\n"
|
||||
" Connect to display named DISPLAY.\n"
|
||||
" EG: -display :1.0\n"
|
||||
" -fake-xinerama-screen WxH+X+Y\n"
|
||||
" Add a FAKE xinerama screen (instead of the real ones)\n"
|
||||
" given the geometry. Add as many as you like. They all\n"
|
||||
" replace the real xinerama screens, if any. This can\n"
|
||||
" be used to simulate xinerama.\n"
|
||||
" EG: -fake-xinerama-screen 800x600+0+0 -fake-xinerama-screen 800x600+800+0\n"
|
||||
" -profile CONF_PROFILE\n"
|
||||
" Use the configuration profile CONF_PROFILE instead of the user selected default or just \"default\".\n"
|
||||
" -good\n"
|
||||
" Be good.\n"
|
||||
" -evil\n"
|
||||
" Be evil.\n"
|
||||
" -psychotic\n"
|
||||
" Be psychotic.\n"
|
||||
" -locked\n"
|
||||
" Start with desklock on, so password will be asked.\n"
|
||||
" -i-really-know-what-i-am-doing-and-accept-full-responsibility-for-it\n"
|
||||
" If you need this help, you don't need this option.\n"
|
||||
" -version\n"
|
||||
"\t-display DISPLAY\n"
|
||||
"\t\tConnect to display named DISPLAY.\n"
|
||||
"\t\tEG: -display :1.0\n"
|
||||
"\t-fake-xinerama-screen WxH+X+Y\n"
|
||||
"\t\tAdd a FAKE xinerama screen (instead of the real ones)\n"
|
||||
"\t\tgiven the geometry. Add as many as you like. They all\n"
|
||||
"\t\treplace the real xinerama screens, if any. This can\n"
|
||||
"\t\tbe used to simulate xinerama.\n"
|
||||
"\t\tEG: -fake-xinerama-screen 800x600+0+0 -fake-xinerama-screen 800x600+800+0\n"
|
||||
"\t-profile CONF_PROFILE\n"
|
||||
"\t\tUse the configuration profile CONF_PROFILE instead of the user selected default or just \"default\".\n"
|
||||
"\t-good\n"
|
||||
"\t\tBe good.\n"
|
||||
"\t-evil\n"
|
||||
"\t\tBe evil.\n"
|
||||
"\t-psychotic\n"
|
||||
"\t\tBe psychotic.\n"
|
||||
"\t-locked\n"
|
||||
"\t\tStart with desklock on, so password will be asked.\n"
|
||||
"\t-i-really-know-what-i-am-doing-and-accept-full-responsibility-for-it\n"
|
||||
"\t\tIf you need this help, you don't need this option.\n"
|
||||
"\t-version\n"
|
||||
)
|
||||
);
|
||||
_e_main_shutdown(11);
|
||||
_e_main_shutdown(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1575,13 +1564,13 @@ _e_main_path_shutdown(void)
|
|||
static int
|
||||
_e_main_screens_init(void)
|
||||
{
|
||||
TS(" screens: client");
|
||||
TS("\tscreens: client");
|
||||
if (!e_client_init()) return 0;
|
||||
TS("E_Screensaver Init");
|
||||
if (!e_screensaver_init()) return 0;
|
||||
TS(" screens: client volume");
|
||||
TS("\tscreens: client volume");
|
||||
if (!e_client_volume_init()) return 0;
|
||||
TS(" screens: win");
|
||||
TS("\tscreens: win");
|
||||
if (!e_win_init()) return 0;
|
||||
TS("Compositor Init");
|
||||
if (!e_comp_init())
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
#include "e.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
#define E_BUS "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);
|
||||
#define PATH "/org/enlightenment/wm/RemoteObject"
|
||||
|
||||
/* local subsystem functions */
|
||||
static void _e_msgbus_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);
|
||||
static Eldbus_Message *_e_msgbus_core_restart_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_core_shutdown_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
|
||||
|
||||
static const Eldbus_Method _e_core_methods[] =
|
||||
static const Eldbus_Method core_methods[] =
|
||||
{
|
||||
{ "Version", NULL, ELDBUS_ARGS({"s", "version"}), _e_msgbus_core_version_cb, 0 },
|
||||
{ "Restart", NULL, NULL, _e_msgbus_core_restart_cb, 0 },
|
||||
|
@ -17,103 +17,65 @@ static const Eldbus_Method _e_core_methods[] =
|
|||
{ NULL, NULL, NULL, NULL, 0}
|
||||
};
|
||||
|
||||
static const Eldbus_Service_Interface_Desc _e_core_desc = {
|
||||
E_IFACE, _e_core_methods, NULL, NULL, NULL, NULL
|
||||
};
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
#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);
|
||||
static Eldbus_Message *_e_msgbus_screensaver_inhibit_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_screensaver_uninhibit_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
|
||||
static Eldbus_Message *_e_msgbus_screensaver_getactive_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
|
||||
|
||||
static const Eldbus_Method _screensaver_core_methods[] =
|
||||
{
|
||||
{ "Inhibit", ELDBUS_ARGS({"s", "application_name"}, {"s", "reason_for_inhibit"}), ELDBUS_ARGS({"u", "cookie"}), _e_msgbus_screensaver_inhibit_cb, 0 },
|
||||
{ "UnInhibit", ELDBUS_ARGS({"u", "cookie"}), NULL, _e_msgbus_screensaver_uninhibit_cb, 0 },
|
||||
{ "GetActive", NULL, ELDBUS_ARGS({"b", "active"}), _e_msgbus_screensaver_getactive_cb, 0 },
|
||||
{ NULL, NULL, NULL, NULL, 0}
|
||||
static const Eldbus_Service_Interface_Desc core_desc = {
|
||||
"org.enlightenment.wm.Core", core_methods, NULL, NULL, NULL, NULL
|
||||
};
|
||||
|
||||
static const Eldbus_Service_Interface_Desc _screensaver_core_desc = {
|
||||
SCREENSAVER_IFACE, _screensaver_core_methods, NULL, NULL, NULL, NULL
|
||||
};
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
E_API E_Msgbus_Data *e_msgbus_data = NULL;
|
||||
/* local subsystem globals */
|
||||
static E_Msgbus_Data *_e_msgbus_data = NULL;
|
||||
|
||||
/* externally accessible functions */
|
||||
EINTERN int
|
||||
e_msgbus_init(void)
|
||||
{
|
||||
e_msgbus_data = E_NEW(E_Msgbus_Data, 1);
|
||||
_e_msgbus_data = E_NEW(E_Msgbus_Data, 1);
|
||||
|
||||
eldbus_init();
|
||||
|
||||
e_msgbus_data->conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SESSION);
|
||||
if (!e_msgbus_data->conn)
|
||||
_e_msgbus_data->conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SESSION);
|
||||
if (!_e_msgbus_data->conn)
|
||||
{
|
||||
WRN("Cannot get ELDBUS_CONNECTION_TYPE_SESSION");
|
||||
return 0;
|
||||
}
|
||||
e_msgbus_data->e_iface = eldbus_service_interface_register
|
||||
(e_msgbus_data->conn, E_PATH, &_e_core_desc);
|
||||
eldbus_name_request(e_msgbus_data->conn, E_BUS, 0,
|
||||
_e_msgbus_core_request_name_cb, NULL);
|
||||
|
||||
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);
|
||||
_e_msgbus_data->iface = eldbus_service_interface_register
|
||||
(_e_msgbus_data->conn, PATH, &core_desc);
|
||||
eldbus_name_request(_e_msgbus_data->conn,
|
||||
"org.enlightenment.wm.service",
|
||||
0, _e_msgbus_request_name_cb, NULL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
EINTERN int
|
||||
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)
|
||||
if (_e_msgbus_data->iface)
|
||||
eldbus_service_object_unregister(_e_msgbus_data->iface);
|
||||
if (_e_msgbus_data->conn)
|
||||
{
|
||||
eldbus_name_release(e_msgbus_data->conn, E_BUS, NULL, NULL);
|
||||
eldbus_connection_unref(e_msgbus_data->conn);
|
||||
eldbus_name_release(_e_msgbus_data->conn,
|
||||
"org.enlightenment.wm.service",
|
||||
NULL, NULL);
|
||||
eldbus_connection_unref(_e_msgbus_data->conn);
|
||||
}
|
||||
eldbus_shutdown();
|
||||
|
||||
EINA_LIST_FREE(e_msgbus_data->screensaver_inhibits, inhibit)
|
||||
_e_msgbus_screensaver_inhibit_free(inhibit);
|
||||
|
||||
E_FREE(e_msgbus_data);
|
||||
E_FREE(_e_msgbus_data);
|
||||
_e_msgbus_data = NULL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
E_API Eldbus_Service_Interface *
|
||||
e_msgbus_interface_attach(const Eldbus_Service_Interface_Desc *desc)
|
||||
{
|
||||
if (!e_msgbus_data->e_iface) return NULL;
|
||||
return eldbus_service_interface_register(e_msgbus_data->conn, E_PATH, desc);
|
||||
if (!_e_msgbus_data->iface) return NULL;
|
||||
return eldbus_service_interface_register(_e_msgbus_data->conn, PATH, desc);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
static void
|
||||
_e_msgbus_core_request_name_cb(void *data EINA_UNUSED,
|
||||
const Eldbus_Message *msg,
|
||||
Eldbus_Pending *pending EINA_UNUSED)
|
||||
_e_msgbus_request_name_cb(void *data EINA_UNUSED, const Eldbus_Message *msg,
|
||||
Eldbus_Pending *pending EINA_UNUSED)
|
||||
{
|
||||
unsigned int flag;
|
||||
|
||||
|
@ -122,21 +84,23 @@ _e_msgbus_core_request_name_cb(void *data EINA_UNUSED,
|
|||
ERR("Could not request bus name");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "u", &flag))
|
||||
{
|
||||
ERR("Could not get arguments on on_name_request");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(flag & ELDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER))
|
||||
WRN("Enlightenment core name already in use\n");
|
||||
WRN("Name already in use\n");
|
||||
}
|
||||
|
||||
/* Core Handlers */
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_core_version_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(reply, NULL);
|
||||
eldbus_message_arguments_append(reply, "s", VERSION);
|
||||
return reply;
|
||||
|
@ -163,174 +127,3 @@ _e_msgbus_core_shutdown_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
|||
e_sys_action_do(E_SYS_EXIT, NULL);
|
||||
return eldbus_message_method_return_new(msg);
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
static void
|
||||
_e_msgbus_screensaver_request_name_cb(void *data EINA_UNUSED,
|
||||
const Eldbus_Message *msg,
|
||||
Eldbus_Pending *pending EINA_UNUSED)
|
||||
{
|
||||
unsigned int flag;
|
||||
|
||||
if (eldbus_message_error_get(msg, NULL, NULL))
|
||||
{
|
||||
ERR("Could not request bus name");
|
||||
return;
|
||||
}
|
||||
if (!eldbus_message_arguments_get(msg, "u", &flag))
|
||||
{
|
||||
ERR("Could not get arguments on on_name_request");
|
||||
return;
|
||||
}
|
||||
if (!(flag & ELDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER))
|
||||
WRN("Screensaver name already in use\n");
|
||||
}
|
||||
|
||||
static void
|
||||
_e_msgbus_screensaver_inhibit_free(E_Msgbus_Data_Screensaver_Inhibit *inhibit)
|
||||
{
|
||||
printf("INH: inhibit remove %i [%s] [%s] [%s]\n", inhibit->cookie, inhibit->application, inhibit->reason, inhibit->sender);
|
||||
if (inhibit->application) eina_stringshare_del(inhibit->application);
|
||||
if (inhibit->reason) eina_stringshare_del(inhibit->reason);
|
||||
if (inhibit->sender)
|
||||
{
|
||||
eldbus_name_owner_changed_callback_del(e_msgbus_data->conn,
|
||||
inhibit->sender,
|
||||
_e_msgbus_screensaver_owner_change_cb,
|
||||
NULL);
|
||||
eina_stringshare_del(inhibit->sender);
|
||||
}
|
||||
free(inhibit);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_msgbus_screensaver_owner_change_cb(void *data EINA_UNUSED, const char *bus EINA_UNUSED, const char *old_id, const char *new_id)
|
||||
{
|
||||
Eina_List *l, *ll;
|
||||
E_Msgbus_Data_Screensaver_Inhibit *inhibit;
|
||||
Eina_Bool removed = EINA_FALSE;
|
||||
|
||||
printf("INH: owner change... [%s] [%s] [%s]\n", bus, old_id, new_id);
|
||||
if ((new_id) && (!new_id[0]))
|
||||
{
|
||||
EINA_LIST_FOREACH_SAFE(e_msgbus_data->screensaver_inhibits, l, ll, inhibit)
|
||||
{
|
||||
if ((inhibit->sender) && (!strcmp(inhibit->sender, old_id)))
|
||||
{
|
||||
_e_msgbus_screensaver_inhibit_free(inhibit);
|
||||
e_msgbus_data->screensaver_inhibits =
|
||||
eina_list_remove_list
|
||||
(e_msgbus_data->screensaver_inhibits, l);
|
||||
removed = EINA_TRUE;
|
||||
}
|
||||
}
|
||||
if ((removed) && (!e_msgbus_data->screensaver_inhibits))
|
||||
{
|
||||
// stop inhibiting SS
|
||||
e_screensaver_update();
|
||||
e_dpms_force_update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_screensaver_inhibit_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
Eldbus_Message *reply = NULL;
|
||||
static unsigned int cookie = 1;
|
||||
const char *application_name = NULL, *reason_for_inhibit = NULL;
|
||||
E_Msgbus_Data_Screensaver_Inhibit *inhibit;
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "ss",
|
||||
&application_name, &reason_for_inhibit))
|
||||
{
|
||||
ERR("Can't get application_name and reason_for_inhibit");
|
||||
goto err;
|
||||
}
|
||||
inhibit = E_NEW(E_Msgbus_Data_Screensaver_Inhibit, 1);
|
||||
if (inhibit)
|
||||
{
|
||||
cookie++;
|
||||
inhibit->application = eina_stringshare_add(application_name);
|
||||
inhibit->reason = eina_stringshare_add(reason_for_inhibit);
|
||||
inhibit->sender = eina_stringshare_add(eldbus_message_sender_get(msg));
|
||||
if (inhibit->sender)
|
||||
eldbus_name_owner_changed_callback_add(e_msgbus_data->conn,
|
||||
inhibit->sender,
|
||||
_e_msgbus_screensaver_owner_change_cb,
|
||||
NULL, EINA_FALSE);
|
||||
inhibit->cookie = cookie;
|
||||
printf("INH: inhibit [%s] [%s] [%s] -> %i\n", inhibit->application, inhibit->reason, inhibit->sender, inhibit->cookie);
|
||||
e_msgbus_data->screensaver_inhibits =
|
||||
eina_list_append(e_msgbus_data->screensaver_inhibits, inhibit);
|
||||
reply = eldbus_message_method_return_new(msg);
|
||||
if (reply)
|
||||
eldbus_message_arguments_append(reply, "u", inhibit->cookie);
|
||||
}
|
||||
if ((e_msgbus_data->screensaver_inhibits) &&
|
||||
(eina_list_count(e_msgbus_data->screensaver_inhibits) == 1))
|
||||
{
|
||||
// start inhibiting SS
|
||||
e_screensaver_deactivate();
|
||||
e_screensaver_update();
|
||||
e_dpms_force_update();
|
||||
}
|
||||
err:
|
||||
return reply;
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_screensaver_uninhibit_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
unsigned int cookie = 0;
|
||||
|
||||
if (!eldbus_message_arguments_get(msg, "u", &cookie))
|
||||
return NULL;
|
||||
e_msgbus_screensaver_inhibit_remove(cookie);
|
||||
return eldbus_message_method_return_new(msg);
|
||||
}
|
||||
|
||||
static Eldbus_Message *
|
||||
_e_msgbus_screensaver_getactive_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
|
||||
const Eldbus_Message *msg)
|
||||
{
|
||||
Eldbus_Message *reply = NULL;
|
||||
|
||||
reply = eldbus_message_method_return_new(msg);
|
||||
printf("INH: getactive = %i\n", e_screensaver_on_get());
|
||||
if (reply)
|
||||
eldbus_message_arguments_append(reply, "b", e_screensaver_on_get());
|
||||
return reply;
|
||||
}
|
||||
|
||||
E_API void
|
||||
e_msgbus_screensaver_inhibit_remove(unsigned int cookie)
|
||||
{
|
||||
Eina_Bool removed = EINA_FALSE;
|
||||
Eina_List *l;
|
||||
E_Msgbus_Data_Screensaver_Inhibit *inhibit;
|
||||
|
||||
EINA_LIST_FOREACH(e_msgbus_data->screensaver_inhibits, l, inhibit)
|
||||
{
|
||||
if (inhibit->cookie == cookie)
|
||||
{
|
||||
_e_msgbus_screensaver_inhibit_free(inhibit);
|
||||
e_msgbus_data->screensaver_inhibits =
|
||||
eina_list_remove_list
|
||||
(e_msgbus_data->screensaver_inhibits, l);
|
||||
removed = EINA_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((removed) && (!e_msgbus_data->screensaver_inhibits))
|
||||
{
|
||||
// stop inhibiting SS
|
||||
e_screensaver_update();
|
||||
e_dpms_force_update();
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifdef E_TYPEDEFS
|
||||
|
||||
typedef struct _E_Msgbus_Data E_Msgbus_Data;
|
||||
typedef struct _E_Msgbus_Data_Screensaver_Inhibit E_Msgbus_Data_Screensaver_Inhibit;
|
||||
typedef struct _E_Msgbus_Data E_Msgbus_Data;
|
||||
|
||||
#else
|
||||
#ifndef E_MSGBUS_H
|
||||
|
@ -11,27 +10,13 @@ typedef struct _E_Msgbus_Data_Screensaver_Inhibit E_Msgbus_Data_Screensaver_Inhi
|
|||
|
||||
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;
|
||||
};
|
||||
|
||||
struct _E_Msgbus_Data_Screensaver_Inhibit
|
||||
{
|
||||
const char *application;
|
||||
const char *reason;
|
||||
const char *sender;
|
||||
unsigned int cookie;
|
||||
Eldbus_Connection *conn;
|
||||
Eldbus_Service_Interface *iface;
|
||||
};
|
||||
|
||||
EINTERN int e_msgbus_init(void);
|
||||
EINTERN int e_msgbus_shutdown(void);
|
||||
E_API Eldbus_Service_Interface *e_msgbus_interface_attach(const Eldbus_Service_Interface_Desc *desc);
|
||||
E_API void e_msgbus_screensaver_inhibit_remove(unsigned int cookie);
|
||||
|
||||
E_API extern E_Msgbus_Data *e_msgbus_data;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -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,28 +15,15 @@ static Notification_Data *n_data = NULL;
|
|||
static void
|
||||
_notification_free(E_Notification_Notify *notify)
|
||||
{
|
||||
int i;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN(notify);
|
||||
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);
|
||||
}
|
||||
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);
|
||||
free(notify);
|
||||
}
|
||||
|
||||
|
@ -44,15 +31,12 @@ 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")) ||
|
||||
(!strcmp(key, "icon_data")))
|
||||
if (!strcmp(key, "image-data") || !strcmp(key, "image_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,
|
||||
|
@ -70,318 +54,173 @@ 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);
|
||||
printf("NOT: image-data=%ix%i,a=%i\n", w, h, alpha);
|
||||
}
|
||||
else if (!strcmp(key, "urgency"))
|
||||
{
|
||||
unsigned char urgency;
|
||||
eldbus_message_iter_arguments_get(var, "y", &urgency);
|
||||
if (urgency < 3)
|
||||
n->urgency = urgency;
|
||||
}
|
||||
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
|
||||
_tag_len(const char *txt)
|
||||
_text_escape(Eina_Strbuf *txt, const char *text)
|
||||
{
|
||||
const char *s;
|
||||
Eina_Bool backslash = EINA_FALSE;
|
||||
Eina_Bool inquote = EINA_FALSE, indblquote = EINA_FALSE;
|
||||
const char *escaped;
|
||||
int advance;
|
||||
|
||||
if (txt[0] != '<') return 0;
|
||||
for (s = txt; *s; s++)
|
||||
escaped = evas_textblock_string_escape_get(text, &advance);
|
||||
if (!escaped)
|
||||
{
|
||||
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;
|
||||
eina_strbuf_append_char(txt, text[0]);
|
||||
advance = 1;
|
||||
}
|
||||
return s - txt;
|
||||
else
|
||||
eina_strbuf_append(txt, escaped);
|
||||
return advance;
|
||||
}
|
||||
|
||||
static char *
|
||||
_path_get(const char *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[] =
|
||||
{
|
||||
Eina_Strbuf *buf;
|
||||
char *ret;
|
||||
const char *s;
|
||||
Eina_Bool backslash = EINA_FALSE;
|
||||
Eina_Bool inquote = EINA_FALSE, indblquote = EINA_FALSE;
|
||||
"<b",
|
||||
"<i",
|
||||
"<u",
|
||||
//"<a", FIXME: we can't actually display these right now
|
||||
//"<img",
|
||||
};
|
||||
|
||||
if (txt[0] == '>') return NULL;
|
||||
static const char *
|
||||
_get_tag(const char *c)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
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;
|
||||
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;
|
||||
}
|
||||
|
||||
static char *
|
||||
char *
|
||||
_nedje_text_escape(const char *text)
|
||||
{
|
||||
Eina_Strbuf *txt;
|
||||
char *ret;
|
||||
const char *text_end;
|
||||
int taglen;
|
||||
size_t text_len;
|
||||
Eina_Array *arr;
|
||||
const char *cur_tag = NULL;
|
||||
|
||||
if (!text) return NULL;
|
||||
|
||||
txt = eina_strbuf_new();
|
||||
if (!txt) return NULL;
|
||||
|
||||
text_end = text + strlen(text);
|
||||
text_len = strlen(text);
|
||||
arr = eina_array_new(3);
|
||||
|
||||
text_end = text + text_len;
|
||||
while (text < text_end)
|
||||
{
|
||||
taglen = _tag_len(text);
|
||||
if (taglen == 0)
|
||||
int advance;
|
||||
|
||||
if ((text[0] == '<') && text[1])
|
||||
{
|
||||
eina_strbuf_append_char(txt, text[0]);
|
||||
text++;
|
||||
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);
|
||||
}
|
||||
else
|
||||
{
|
||||
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;
|
||||
advance = _text_escape(txt, text);
|
||||
|
||||
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;
|
||||
}
|
||||
text += advance;
|
||||
}
|
||||
|
||||
eina_array_free(arr);
|
||||
ret = eina_strbuf_string_steal(txt);
|
||||
printf("NOT: body -> [%s]\n", ret);
|
||||
eina_strbuf_free(txt);
|
||||
return ret;
|
||||
}
|
||||
|
@ -392,30 +231,28 @@ 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, *txt2;
|
||||
int num;
|
||||
char *txt;
|
||||
|
||||
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);
|
||||
|
@ -424,44 +261,22 @@ 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 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);
|
||||
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);
|
||||
return eldbus_message_method_return_new(msg);
|
||||
}
|
||||
|
||||
|
@ -476,10 +291,8 @@ 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;
|
||||
}
|
||||
|
@ -488,32 +301,23 @@ 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 }
|
||||
};
|
||||
|
||||
|
@ -528,7 +332,6 @@ 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}
|
||||
};
|
||||
|
||||
|
@ -544,8 +347,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);
|
||||
|
||||
|
@ -556,7 +359,8 @@ 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;
|
||||
}
|
||||
|
||||
|
@ -577,17 +381,7 @@ 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);
|
||||
}
|
||||
|
||||
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);
|
||||
notify->id, reason);
|
||||
}
|
||||
|
||||
E_API Evas_Object *
|
||||
|
@ -697,7 +491,6 @@ 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)");
|
||||
|
@ -740,7 +533,8 @@ 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;
|
||||
|
@ -753,7 +547,8 @@ 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
|
||||
|
@ -767,12 +562,11 @@ 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));
|
||||
|
@ -785,7 +579,8 @@ 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;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,39 +7,35 @@
|
|||
|
||||
typedef enum _E_Notification_Notify_Urgency
|
||||
{
|
||||
E_NOTIFICATION_NOTIFY_URGENCY_LOW = 0,
|
||||
E_NOTIFICATION_NOTIFY_URGENCY_NORMAL = 1,
|
||||
E_NOTIFICATION_NOTIFY_URGENCY_CRITICAL = 2
|
||||
E_NOTIFICATION_NOTIFY_URGENCY_LOW,
|
||||
E_NOTIFICATION_NOTIFY_URGENCY_NORMAL,
|
||||
E_NOTIFICATION_NOTIFY_URGENCY_CRITICAL
|
||||
} E_Notification_Notify_Urgency;
|
||||
|
||||
typedef enum _E_Notification_Notify_Closed_Reason
|
||||
{
|
||||
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_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;
|
||||
|
||||
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 int replaces_id;
|
||||
unsigned replaces_id;
|
||||
const char *summary;
|
||||
const char *body;
|
||||
int timeout; // time in ms
|
||||
int timeout;
|
||||
E_Notification_Notify_Urgency urgency;
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
const char *icon;
|
||||
const char *icon_path;
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
int width;
|
||||
int height;
|
||||
int rowstride;
|
||||
|
@ -50,17 +46,6 @@ 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);
|
||||
|
@ -95,9 +80,7 @@ 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
|
||||
|
||||
|
|
|
@ -391,17 +391,26 @@ _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_fallback_to_x11_pointer(E_Pointer *ptr)
|
||||
_e_pointer_x11_setup(E_Pointer *ptr, const char *cursor)
|
||||
{
|
||||
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->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;
|
||||
}
|
||||
if (ptr->buffer_evas) _e_pointer_canvas_del(ptr);
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (!e_comp_util_has_x()) return;
|
||||
|
@ -450,43 +459,6 @@ _e_pointer_x11_fallback_to_x11_pointer(E_Pointer *ptr)
|
|||
#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)
|
||||
{
|
||||
|
@ -514,17 +486,18 @@ _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);
|
||||
|
||||
if (!_e_pointer_theme_object_setup(ptr->o_ptr, cursor, ptr->o_hot))
|
||||
/* 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_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);
|
||||
}
|
||||
edje_object_signal_emit(ptr->o_ptr, "e,state,init", "e");
|
||||
edje_object_message_signal_process(ptr->o_ptr);
|
||||
init = EINA_TRUE;
|
||||
}
|
||||
_e_pointer_x11_setup(ptr, cursor);
|
||||
if (!cursor[0]) return;
|
||||
|
||||
_hot_update(ptr);
|
||||
|
||||
|
@ -534,17 +507,7 @@ _e_pointer_type_set(E_Pointer *ptr, const char *type)
|
|||
evas_object_show(ptr->o_ptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
_e_pointer_x11_setup(ptr, NULL);
|
||||
}
|
||||
|
||||
EINTERN int
|
||||
|
@ -886,7 +849,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_GOTO(ptr->o_ptr, misst);
|
||||
EINA_SAFETY_ON_NULL_RETURN(ptr->o_ptr);
|
||||
|
||||
ecore_evas_cursor_get(ptr->ee, &o, NULL, &px, &py);
|
||||
if (o)
|
||||
|
@ -922,10 +885,6 @@ 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
|
||||
|
|