Enlightenment CVS committal Author : rbdpngn Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_window.c Log Message: Resize the window prior to mapping to avoid extra X events and confusing the window manager. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_window.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- ewl_window.c 5 Sep 2005 14:12:15 -0000 1.14 +++ ewl_window.c 23 Sep 2005 15:32:24 -0000 1.15 @@ -629,19 +629,40 @@ void ewl_window_show_cb(Ewl_Widget * w, void *ev_data __UNUSED__, void *user_data __UNUSED__) { + Ewl_Window *win = EWL_WINDOW(w); + DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("w", w); - if (!EWL_WINDOW(w)->window) + if (!win->window) DRETURN(DLEVEL_STABLE); #ifdef HAVE_EVAS_ENGINE_SOFTWARE_X11_H - if (strstr(EWL_WINDOW(w)->render, "x11")) { - if (EWL_WINDOW(w)->flags & EWL_WINDOW_BORDERLESS) - ecore_x_mwm_borderless_set((Ecore_X_Window) - EWL_WINDOW(w)->window, 1); + if (strstr(win->render, "x11")) { + int width, height; + + if (win->flags & EWL_WINDOW_BORDERLESS) + ecore_x_mwm_borderless_set((Ecore_X_Window)win->window, + 1); + + /* + * Find out how much space the widget accepted. + */ + width = ewl_object_current_w_get(EWL_OBJECT(w)); + height = ewl_object_current_h_get(EWL_OBJECT(w)); + + /* + * Now give the windows the appropriate size + */ + if (win->flags & EWL_WINDOW_USER_CONFIGURE) + win->flags &= ~EWL_WINDOW_USER_CONFIGURE; + else { + if (strstr(win->render, "x11")) + ecore_x_window_resize((Ecore_X_Window)win->window, + width, height); + } - ecore_x_window_show((Ecore_X_Window)EWL_WINDOW(w)->window); + ecore_x_window_show((Ecore_X_Window)win->window); ecore_x_window_show((Ecore_X_Window)EWL_EMBED(w)->evas_window); } #endif ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs