parent
6dc3c880f9
commit
a3bc3f6ccc
|
@ -1,3 +1,8 @@
|
||||||
|
2013-02-07 Carsten Haitzler
|
||||||
|
|
||||||
|
* fix clock timerfd usage to actually detect a date change.
|
||||||
|
* improve clock to also listen to /etc/timezone changes too.
|
||||||
|
|
||||||
2013-02-06 Mike Blumenkrantz
|
2013-02-06 Mike Blumenkrantz
|
||||||
|
|
||||||
* moved "allow windows above fullscreen windows" option to geometry settings dialog
|
* moved "allow windows above fullscreen windows" option to geometry settings dialog
|
||||||
|
|
2
NEWS
2
NEWS
|
@ -12,6 +12,7 @@ Changes:
|
||||||
Removed:
|
Removed:
|
||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
* clock listens to /etc/timezone changes now too
|
||||||
|
|
||||||
Fixes:
|
Fixes:
|
||||||
* fixed window autoraise triggering from pointer slide
|
* fixed window autoraise triggering from pointer slide
|
||||||
|
@ -26,6 +27,7 @@ Fixes:
|
||||||
* fix bug where edge flips would stop functioning after dragging to an invalid edge containing a shelf
|
* fix bug where edge flips would stop functioning after dragging to an invalid edge containing a shelf
|
||||||
* moved "allow windows above fullscreen windows" option to geometry settings dialog
|
* moved "allow windows above fullscreen windows" option to geometry settings dialog
|
||||||
* fix filemanager efreet cache listeners and updates
|
* fix filemanager efreet cache listeners and updates
|
||||||
|
* fix clock timerfd usage to actually detect date changes
|
||||||
|
|
||||||
|
|
||||||
Changes since 0.17.0:
|
Changes since 0.17.0:
|
||||||
|
|
|
@ -40,6 +40,7 @@ static Config_Item *_conf_item_get(const char *id);
|
||||||
static void _clock_popup_free(Instance *inst);
|
static void _clock_popup_free(Instance *inst);
|
||||||
|
|
||||||
static Eio_Monitor *clock_tz_monitor = NULL;
|
static Eio_Monitor *clock_tz_monitor = NULL;
|
||||||
|
static Eio_Monitor *clock_tz2_monitor = NULL;
|
||||||
static Eina_List *clock_eio_handlers = NULL;
|
static Eina_List *clock_eio_handlers = NULL;
|
||||||
Config *clock_config = NULL;
|
Config *clock_config = NULL;
|
||||||
|
|
||||||
|
@ -805,6 +806,8 @@ _clock_eio_error(void *d __UNUSED__, int type __UNUSED__, void *event __UNUSED__
|
||||||
{
|
{
|
||||||
eio_monitor_del(clock_tz_monitor);
|
eio_monitor_del(clock_tz_monitor);
|
||||||
clock_tz_monitor = eio_monitor_add("/etc/localtime");
|
clock_tz_monitor = eio_monitor_add("/etc/localtime");
|
||||||
|
eio_monitor_del(clock_tz2_monitor);
|
||||||
|
clock_tz2_monitor = eio_monitor_add("/etc/timezone");
|
||||||
return ECORE_CALLBACK_RENEW;
|
return ECORE_CALLBACK_RENEW;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -867,6 +870,7 @@ e_modapi_init(E_Module *m)
|
||||||
|
|
||||||
clock_config->module = m;
|
clock_config->module = m;
|
||||||
clock_tz_monitor = eio_monitor_add("/etc/localtime");
|
clock_tz_monitor = eio_monitor_add("/etc/localtime");
|
||||||
|
clock_tz2_monitor = eio_monitor_add("/etc/timezone");
|
||||||
E_LIST_HANDLER_APPEND(clock_eio_handlers, EIO_MONITOR_ERROR, _clock_eio_error, NULL);
|
E_LIST_HANDLER_APPEND(clock_eio_handlers, EIO_MONITOR_ERROR, _clock_eio_error, NULL);
|
||||||
E_LIST_HANDLER_APPEND(clock_eio_handlers, EIO_MONITOR_FILE_CREATED, _clock_eio_update, NULL);
|
E_LIST_HANDLER_APPEND(clock_eio_handlers, EIO_MONITOR_FILE_CREATED, _clock_eio_update, NULL);
|
||||||
E_LIST_HANDLER_APPEND(clock_eio_handlers, EIO_MONITOR_FILE_MODIFIED, _clock_eio_update, NULL);
|
E_LIST_HANDLER_APPEND(clock_eio_handlers, EIO_MONITOR_FILE_MODIFIED, _clock_eio_update, NULL);
|
||||||
|
@ -878,19 +882,32 @@ e_modapi_init(E_Module *m)
|
||||||
e_gadcon_provider_register(&_gadcon_class);
|
e_gadcon_provider_register(&_gadcon_class);
|
||||||
|
|
||||||
#ifdef HAVE_SYS_TIMERFD_H
|
#ifdef HAVE_SYS_TIMERFD_H
|
||||||
int timer_fd;
|
|
||||||
int flags;
|
#ifndef TFD_TIMER_CANCELON_SET
|
||||||
|
# define TFD_TIMER_CANCELON_SET (1 << 1)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
int timer_fd;
|
||||||
|
int flags;
|
||||||
|
struct itimerspec its;
|
||||||
|
|
||||||
|
// on old systems, flags must be 0, so we'll play nice and do it always
|
||||||
|
timer_fd = timerfd_create(CLOCK_REALTIME, 0);
|
||||||
|
if (timer_fd < 0) return m;
|
||||||
|
fcntl(timer_fd, F_SETFL, O_NONBLOCK);
|
||||||
|
|
||||||
/* on old systems, flags must be 0, so we'll play nice and do it always */
|
flags = fcntl(timer_fd, F_GETFD);
|
||||||
timer_fd = timerfd_create(CLOCK_REALTIME, 0);
|
flags |= FD_CLOEXEC;
|
||||||
if (timer_fd < 0) return m;
|
fcntl(timer_fd, F_SETFD, flags);
|
||||||
fcntl(timer_fd, F_SETFL, O_NONBLOCK);
|
|
||||||
|
memset(&its, 0, sizeof(its));
|
||||||
flags = fcntl(timer_fd, F_GETFD);
|
timerfd_settime(timer_fd, TFD_TIMER_ABSTIME | TFD_TIMER_CANCELON_SET,
|
||||||
flags |= FD_CLOEXEC;
|
&its, NULL);
|
||||||
fcntl(timer_fd, F_SETFD, flags);
|
|
||||||
|
timerfd_handler = ecore_main_fd_handler_add(timer_fd, ECORE_FD_READ,
|
||||||
timerfd_handler = ecore_main_fd_handler_add(timer_fd, ECORE_FD_READ, _clock_fd_update, NULL, NULL, NULL);
|
_clock_fd_update, NULL,
|
||||||
|
NULL, NULL);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
@ -933,7 +950,9 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
|
||||||
update_today = NULL;
|
update_today = NULL;
|
||||||
}
|
}
|
||||||
eio_monitor_del(clock_tz_monitor);
|
eio_monitor_del(clock_tz_monitor);
|
||||||
|
eio_monitor_del(clock_tz2_monitor);
|
||||||
clock_tz_monitor = NULL;
|
clock_tz_monitor = NULL;
|
||||||
|
clock_tz2_monitor = NULL;
|
||||||
#ifdef HAVE_SYS_TIMERFD_H
|
#ifdef HAVE_SYS_TIMERFD_H
|
||||||
timerfd_handler = ecore_main_fd_handler_del(timerfd_handler);
|
timerfd_handler = ecore_main_fd_handler_del(timerfd_handler);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue