Check rc_intersect result and added comments.

This commit is contained in:
Ole Loots 2013-04-16 21:57:27 +02:00
parent fa8d298b9b
commit a6995849d2
2 changed files with 6 additions and 3 deletions

View File

@ -102,6 +102,7 @@ short gemtk_msg_box_show(short type, const char * msg);
#define GEMTK_WM_FLAG_RECV_PREPROC_WM 0x02 // get notified even when pre-processed
#define GEMTK_WM_FLAG_HAS_VTOOLBAR 0x04 // the attached toolbar is vertical
#define GEMTK_WM_FLAG_CUSTOM_TOOLBAR 0x08 // no internal toolbar handling
// (Except considering it's size)
#define GEMTK_WM_FLAG_CUSTOM_SCROLLING 0x20 // no internal scroller handling
#define GEMTK_WM_FLAG_DEFAULTS \

View File

@ -26,8 +26,8 @@
#include "gemtk.h"
#define DEBUG_PRINT(x) printf x
//#define DEBUG_PRINT(x)
//#define DEBUG_PRINT(x) printf x
#define DEBUG_PRINT(x)
struct gemtk_window_s {
@ -102,7 +102,9 @@ static void move_rect(GUIWIN * win, GRECT *rect, int dx, int dy)
/* get intersection with screen area */
wind_get_grect(0, WF_CURRXYWH, &g);
rc_intersect(&g, rect);
if(!rc_intersect(&g, rect)){
return;
}
xy[0] = rect->g_x;
xy[1] = rect->g_y;
xy[2] = xy[0] + rect->g_w-1;