Browse Source

add win move event dump.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@369 bbd45198-f89e-11dd-88c7-29a3b14d5316
bernard.xiong 15 years ago
parent
commit
12961c68da
2 changed files with 19 additions and 1 deletions
  1. 15 0
      rtgui/common/rtgui_system.c
  2. 4 1
      rtgui/server/topwin.c

+ 15 - 0
rtgui/common/rtgui_system.c

@@ -133,6 +133,18 @@ static void rtgui_event_dump(rt_thread_t tid, rtgui_event_t* event)
 				rt_kprintf("win: %s", info->wid->title);
 				rt_kprintf("win: %s", info->wid->title);
 #ifdef RTGUI_USING_SMALL_SIZE
 #ifdef RTGUI_USING_SMALL_SIZE
 			rt_kprintf(" clip no. %d", info->num_rect);
 			rt_kprintf(" clip no. %d", info->num_rect);
+#else
+			{
+				rtgui_rect_t *rect;
+				rt_uint32_t index;
+
+				rect = (rtgui_rect_t*)(info + 1);
+				for (index = 0; index < info->num_rect; index ++)
+				{
+					rt_kprintf(" (x1:%d, y1:%d, x2:%d, y2:%d)", rect->x1, rect->y1, rect->x2, rect->y2);
+					rect ++;
+				}
+			}
 #endif
 #endif
 		}
 		}
 		break;
 		break;
@@ -176,7 +188,10 @@ static void rtgui_event_dump(rt_thread_t tid, rtgui_event_t* event)
 			struct rtgui_event_win_move *win = (struct rtgui_event_win_move *)event;
 			struct rtgui_event_win_move *win = (struct rtgui_event_win_move *)event;
 
 
 			if(win->wid != RT_NULL)
 			if(win->wid != RT_NULL)
+			{
 				rt_kprintf("win: %s", win->wid->title);
 				rt_kprintf("win: %s", win->wid->title);
+				rt_kprintf(" to (x:%d, y:%d)", win->x, win->y);
+			}
 		}
 		}
 		break;
 		break;
 
 

+ 4 - 1
rtgui/server/topwin.c

@@ -1010,7 +1010,10 @@ void rtgui_topwin_get_clipinfo(struct rtgui_rect* rect_list, rt_int32_t count)
 	{
 	{
 		topwin = rtgui_list_entry(node, struct rtgui_topwin, list);
 		topwin = rtgui_list_entry(node, struct rtgui_topwin, list);
 
 
-		*rect = topwin->extent;
+		if (topwin->title != RT_NULL) 
+			rtgui_widget_get_rect(RTGUI_WIDGET(topwin->title), rect);
+		else *rect = topwin->extent;
+
 		rect  ++;
 		rect  ++;
 		count --;
 		count --;
 		if (count < 0) break;
 		if (count < 0) break;