Enlightenment CVS committal
Author : codewarrior
Project : e17
Module : libs/etk
Dir : e17/libs/etk/src/lib
Modified Files:
etk_window.c etk_window.h
Log Message:
[Etk_Window] Account for case when trying to center an Etk_Window on the
root window when the Etk_Window has not been showed or allocated any size
yet by queueing the center operation properly.
===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_window.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -3 -r1.57 -r1.58
--- etk_window.c 28 Sep 2007 20:11:29 -0000 1.57
+++ etk_window.c 10 Apr 2008 16:39:53 -0000 1.58
@@ -236,6 +236,7 @@
if (window_to_center->wait_size_request)
{
window_to_center->center_on_window = window;
+ window_to_center->center_queued = ETK_TRUE;
if (window)
etk_object_weak_pointer_add(ETK_OBJECT(window), (void
**)(&window_to_center->center_on_window));
}
@@ -605,6 +606,7 @@
window->wait_size_request = ETK_TRUE;
window->center_on_window = NULL;
+ window->center_queued = ETK_FALSE;
window->delete_event = _etk_window_delete_event_handler;
etk_engine_window_constructor(window);
@@ -776,8 +778,11 @@
window->wait_size_request = ETK_FALSE;
if (etk_widget_is_visible(ETK_WIDGET(window)))
etk_engine_window_show(window);
- if (window->center_on_window)
+ if (window->center_on_window || window->center_queued)
+ {
etk_window_center_on_window(window, window->center_on_window);
+ window->center_queued =
ETK_FALSE;
+ }
}
}
===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_window.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- etk_window.h 28 Sep 2007 19:47:52 -0000 1.29
+++ etk_window.h 10 Apr 2008 16:39:53 -0000 1.30
@@ -53,6 +53,7 @@
Etk_Bool (*delete_event)(Etk_Window *window);
Etk_Window *center_on_window;
+ Etk_Bool center_queued;
Etk_Bool wait_size_request:1;
};
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs