parent
57e5fb09d4
commit
05e7471a1a
5
src/E.h
5
src/E.h
|
@ -971,6 +971,11 @@ Qentry *GetHeadTimerQueue(void);
|
||||||
void HandleTimerEvent(void);
|
void HandleTimerEvent(void);
|
||||||
int RemoveTimerEvent(const char *name);
|
int RemoveTimerEvent(const char *name);
|
||||||
|
|
||||||
|
struct _idler;
|
||||||
|
void IdlerAdd(int order, void (*func) (void *data), void *data);
|
||||||
|
void IdlerDel(struct _idler *id);
|
||||||
|
void IdlersRun(void);
|
||||||
|
|
||||||
/* warp.c */
|
/* warp.c */
|
||||||
void WarpFocus(int delta);
|
void WarpFocus(int delta);
|
||||||
|
|
||||||
|
|
|
@ -1047,6 +1047,12 @@ DesksStackingCheck(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_DesksIdler(void *data __UNUSED__)
|
||||||
|
{
|
||||||
|
DesksStackingCheck();
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
DeskMove(Desk * dsk, int x, int y)
|
DeskMove(Desk * dsk, int x, int y)
|
||||||
{
|
{
|
||||||
|
@ -2198,10 +2204,7 @@ DesksSighan(int sig, void *prm __UNUSED__)
|
||||||
case ESIGNAL_START:
|
case ESIGNAL_START:
|
||||||
/* Draw all the buttons that belong on the desktop */
|
/* Draw all the buttons that belong on the desktop */
|
||||||
DeskShowButtons();
|
DeskShowButtons();
|
||||||
break;
|
IdlerAdd(50, _DesksIdler, NULL);
|
||||||
|
|
||||||
case ESIGNAL_IDLE:
|
|
||||||
DesksStackingCheck();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
10
src/dialog.c
10
src/dialog.c
|
@ -1725,8 +1725,8 @@ DialogUpdate(Dialog * d)
|
||||||
d->xu2 = d->yu2 = 0;
|
d->xu2 = d->yu2 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
DialogsCheckUpdate(void)
|
_DialogsCheckUpdate(void *data __UNUSED__)
|
||||||
{
|
{
|
||||||
Dialog *d;
|
Dialog *d;
|
||||||
|
|
||||||
|
@ -1742,6 +1742,12 @@ DialogsCheckUpdate(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
DialogsInit(void)
|
||||||
|
{
|
||||||
|
IdlerAdd(50, _DialogsCheckUpdate, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
DialogItemsRealize(Dialog * d)
|
DialogItemsRealize(Dialog * d)
|
||||||
{
|
{
|
||||||
|
|
|
@ -127,7 +127,7 @@ void DialogItemAreaSetEventFunc(DItem * di,
|
||||||
|
|
||||||
void DialogCallbackClose(Dialog * d, int val, void *data);
|
void DialogCallbackClose(Dialog * d, int val, void *data);
|
||||||
|
|
||||||
void DialogsCheckUpdate(void);
|
void DialogsInit(void);
|
||||||
|
|
||||||
EWin *FindEwinByDialog(Dialog * d);
|
EWin *FindEwinByDialog(Dialog * d);
|
||||||
|
|
||||||
|
|
|
@ -2136,6 +2136,18 @@ ECompMgrRepaint(void)
|
||||||
allDamage = None;
|
allDamage = None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_ECompMgrIdler(void *data __UNUSED__)
|
||||||
|
{
|
||||||
|
/* Do we get here on auto? */
|
||||||
|
if (!allDamage /* || Conf_compmgr.mode == ECM_MODE_AUTO */ )
|
||||||
|
return;
|
||||||
|
ECompMgrRepaint();
|
||||||
|
#if 0 /* FIXME - Was here - Why? */
|
||||||
|
XSync(disp, False);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ECompMgrRootConfigure(void *prm __UNUSED__, XEvent * ev)
|
ECompMgrRootConfigure(void *prm __UNUSED__, XEvent * ev)
|
||||||
{
|
{
|
||||||
|
@ -2622,14 +2634,7 @@ ECompMgrSighan(int sig, void *prm __UNUSED__)
|
||||||
ECompMgrInit();
|
ECompMgrInit();
|
||||||
if (Conf_compmgr.enable)
|
if (Conf_compmgr.enable)
|
||||||
ECompMgrStart();
|
ECompMgrStart();
|
||||||
break;
|
IdlerAdd(50, _ECompMgrIdler, NULL);
|
||||||
|
|
||||||
case ESIGNAL_IDLE:
|
|
||||||
/* Do we get here on auto? */
|
|
||||||
if (!allDamage /* || Conf_compmgr.mode == ECM_MODE_AUTO */ )
|
|
||||||
return;
|
|
||||||
ECompMgrRepaint();
|
|
||||||
XSync(disp, False);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,6 @@ typedef enum
|
||||||
ESIGNAL_CONFIGURE,
|
ESIGNAL_CONFIGURE,
|
||||||
ESIGNAL_START,
|
ESIGNAL_START,
|
||||||
ESIGNAL_EXIT,
|
ESIGNAL_EXIT,
|
||||||
ESIGNAL_IDLE,
|
|
||||||
ESIGNAL_AREA_CONFIGURED,
|
ESIGNAL_AREA_CONFIGURED,
|
||||||
ESIGNAL_AREA_SWITCH_START,
|
ESIGNAL_AREA_SWITCH_START,
|
||||||
ESIGNAL_AREA_SWITCH_DONE,
|
ESIGNAL_AREA_SWITCH_DONE,
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
*/
|
*/
|
||||||
#include "E.h"
|
#include "E.h"
|
||||||
#include "aclass.h"
|
#include "aclass.h"
|
||||||
#include "dialog.h" /* FIXME - Should not be here */
|
|
||||||
#include "emodule.h"
|
#include "emodule.h"
|
||||||
#include "xwin.h"
|
#include "xwin.h"
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
@ -626,8 +625,7 @@ EventsMain(void)
|
||||||
|
|
||||||
if (EventDebug(EDBUG_TYPE_EVENTS))
|
if (EventDebug(EDBUG_TYPE_EVENTS))
|
||||||
Eprintf("EventsMain - Idlers\n");
|
Eprintf("EventsMain - Idlers\n");
|
||||||
DialogsCheckUpdate(); /* FIXME - Shouldn't be here */
|
IdlersRun();
|
||||||
ModulesSignal(ESIGNAL_IDLE, NULL);
|
|
||||||
|
|
||||||
if (pfetch)
|
if (pfetch)
|
||||||
{
|
{
|
||||||
|
|
17
src/focus.c
17
src/focus.c
|
@ -863,6 +863,15 @@ FocusInitTimeout(int val __UNUSED__, void *data __UNUSED__)
|
||||||
FocusInit();
|
FocusInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_FocusIdler(void *data __UNUSED__)
|
||||||
|
{
|
||||||
|
if (!focus_inhibit && focus_pending_why)
|
||||||
|
FocusSet();
|
||||||
|
if (focus_pending_update_grabs)
|
||||||
|
doFocusGrabsUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
FocusSighan(int sig, void *prm __UNUSED__)
|
FocusSighan(int sig, void *prm __UNUSED__)
|
||||||
{
|
{
|
||||||
|
@ -870,19 +879,13 @@ FocusSighan(int sig, void *prm __UNUSED__)
|
||||||
{
|
{
|
||||||
case ESIGNAL_START:
|
case ESIGNAL_START:
|
||||||
/* Delay focusing a bit to allow things to settle down */
|
/* Delay focusing a bit to allow things to settle down */
|
||||||
|
IdlerAdd(50, _FocusIdler, NULL);
|
||||||
DoIn("FOCUS_INIT_TIMEOUT", 0.5, FocusInitTimeout, 0, NULL);
|
DoIn("FOCUS_INIT_TIMEOUT", 0.5, FocusInitTimeout, 0, NULL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ESIGNAL_EXIT:
|
case ESIGNAL_EXIT:
|
||||||
FocusExit();
|
FocusExit();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ESIGNAL_IDLE:
|
|
||||||
if (!focus_inhibit && focus_pending_why)
|
|
||||||
FocusSet();
|
|
||||||
if (focus_pending_update_grabs)
|
|
||||||
doFocusGrabsUpdate();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
#include "E.h"
|
#include "E.h"
|
||||||
#include "desktops.h"
|
#include "desktops.h"
|
||||||
|
#include "dialog.h"
|
||||||
#include "emodule.h"
|
#include "emodule.h"
|
||||||
#include "hints.h"
|
#include "hints.h"
|
||||||
#include "snaps.h"
|
#include "snaps.h"
|
||||||
|
@ -286,6 +287,7 @@ main(int argc, char **argv)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ModulesSignal(ESIGNAL_START, NULL);
|
ModulesSignal(ESIGNAL_START, NULL);
|
||||||
|
DialogsInit();
|
||||||
|
|
||||||
/* Map the clients */
|
/* Map the clients */
|
||||||
MapUnmap(1);
|
MapUnmap(1);
|
||||||
|
|
|
@ -282,7 +282,7 @@ ActionResizeStart(EWin * ewin, int grab, int hv)
|
||||||
EGrabServer();
|
EGrabServer();
|
||||||
ModulesSignal(ESIGNAL_ANIMATION_SUSPEND, NULL);
|
ModulesSignal(ESIGNAL_ANIMATION_SUSPEND, NULL);
|
||||||
/* Run idlers (stacking, border updates, ...) before drawing lines */
|
/* Run idlers (stacking, border updates, ...) before drawing lines */
|
||||||
ModulesSignal(ESIGNAL_IDLE, NULL);
|
IdlersRun();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
12
src/pager.c
12
src/pager.c
|
@ -775,6 +775,12 @@ PagerUpdateTimeout(int val __UNUSED__, void *data __UNUSED__)
|
||||||
PagersCheckUpdate();
|
PagersCheckUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_PagersIdler(void *data __UNUSED__)
|
||||||
|
{
|
||||||
|
PagersCheckUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
PagerEwinUpdateFromPager(Pager * p, EWin * ewin)
|
PagerEwinUpdateFromPager(Pager * p, EWin * ewin)
|
||||||
{
|
{
|
||||||
|
@ -1904,11 +1910,7 @@ PagersSighan(int sig, void *prm)
|
||||||
break;
|
break;
|
||||||
Conf_pagers.enable = 0;
|
Conf_pagers.enable = 0;
|
||||||
PagersShow(1);
|
PagersShow(1);
|
||||||
PagersCheckUpdate();
|
IdlerAdd(50, _PagersIdler, NULL);
|
||||||
break;
|
|
||||||
|
|
||||||
case ESIGNAL_IDLE:
|
|
||||||
PagersCheckUpdate();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ESIGNAL_AREA_CONFIGURED:
|
case ESIGNAL_AREA_CONFIGURED:
|
||||||
|
|
47
src/timers.c
47
src/timers.c
|
@ -21,6 +21,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
#include "E.h"
|
#include "E.h"
|
||||||
|
#include "e16-ecore_list.h"
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
double
|
double
|
||||||
|
@ -132,3 +133,49 @@ RemoveTimerEvent(const char *name)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Ecore_List *idler_list = NULL;
|
||||||
|
|
||||||
|
typedef struct _idler Idler;
|
||||||
|
typedef void (IdlerFunc) (void *data);
|
||||||
|
|
||||||
|
struct _idler
|
||||||
|
{
|
||||||
|
int order;
|
||||||
|
IdlerFunc *func;
|
||||||
|
void *data;
|
||||||
|
};
|
||||||
|
|
||||||
|
void
|
||||||
|
IdlerAdd(int order, IdlerFunc * func, void *data)
|
||||||
|
{
|
||||||
|
Idler *id;
|
||||||
|
|
||||||
|
id = Emalloc(sizeof(Idler));
|
||||||
|
if (!id)
|
||||||
|
return;
|
||||||
|
|
||||||
|
id->order = order; /* Not used atm. */
|
||||||
|
id->func = func;
|
||||||
|
id->data = data;
|
||||||
|
|
||||||
|
if (!idler_list)
|
||||||
|
idler_list = ecore_list_new();
|
||||||
|
|
||||||
|
ecore_list_append(idler_list, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
IdlerDel(Idler * id)
|
||||||
|
{
|
||||||
|
ecore_list_remove_node(idler_list, id);
|
||||||
|
Efree(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
IdlersRun(void)
|
||||||
|
{
|
||||||
|
Idler *id;
|
||||||
|
|
||||||
|
ECORE_LIST_FOR_EACH(idler_list, id) id->func(id->data);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue