From c4fa8d84c5fb398d3afe47cc83d51b71d0a94a30 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 24 Nov 2001 06:03:27 +0000 Subject: [PATCH] extra calls... SVN revision: 5727 --- legacy/ecore/src/Ecore.h | 1 + legacy/ecore/src/e_x.c | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/legacy/ecore/src/Ecore.h b/legacy/ecore/src/Ecore.h index 6cc8ddef5a..d640a0abb1 100644 --- a/legacy/ecore/src/Ecore.h +++ b/legacy/ecore/src/Ecore.h @@ -742,6 +742,7 @@ extern "C" void ecore_focus_window_set(Window win); Window ecore_focus_window_get(void); void ecore_focus_to_window(Window win); + void ecore_focus_mode_reset(void); Atom ecore_atom_get(char *name); diff --git a/legacy/ecore/src/e_x.c b/legacy/ecore/src/e_x.c index b2085a2f18..9b42dbe6e6 100644 --- a/legacy/ecore/src/e_x.c +++ b/legacy/ecore/src/e_x.c @@ -482,6 +482,8 @@ ecore_window_set_background_pixmap(Window win, Pixmap pmap) { if (!disp) return; + if (win == 0) + win = default_root; XSetWindowBackgroundPixmap(disp, win, pmap); } @@ -615,7 +617,8 @@ ecore_window_clear(Window win) { if (!disp) return; - + if (win == 0) + win = default_root; XClearWindow(disp, win); } @@ -624,7 +627,8 @@ ecore_window_clear_area(Window win, int x, int y, int w, int h) { if (!disp) return; - + if (win == 0) + win = default_root; XClearArea(disp, win, x, y, w, h, False); } @@ -1693,6 +1697,13 @@ ecore_focus_to_window(Window win) XSetInputFocus(disp, win, RevertToNone, CurrentTime); } +void +ecore_focus_mode_reset(void) +{ + if (!disp) return; + XSetInputFocus(disp, default_root, RevertToPointerRoot, CurrentTime); +} + Atom ecore_atom_get(char *name) {