Enlightenment CVS committal
Author : doursse
Project : e17
Module : apps/expedite
Dir : e17/apps/expedite/src/bin
Modified Files:
engine_software_ddraw.c
Log Message:
CreateWindow creates a window whose size takes into account the client area +
the title bar + the borders. Call AdjustWindowRect before to get rid of that.
Remove some debug printf
===================================================================
RCS file: /cvs/e/e17/apps/expedite/src/bin/engine_software_ddraw.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- engine_software_ddraw.c 27 May 2007 11:10:49 -0000 1.1
+++ engine_software_ddraw.c 28 May 2007 08:00:42 -0000 1.2
@@ -134,15 +134,10 @@
HDC hdc;
hdc = BeginPaint (window, &ps);
- printf ("WM_WINDOWPOSCHANGED (%d, %d), (%d, %d)\n",
- ps.rcPaint.left,
- ps.rcPaint.top,
- ps.rcPaint.right - ps.rcPaint.left + 1,
- ps.rcPaint.bottom - ps.rcPaint.top + 1);
evas_damage_rectangle_add(evas,
ps.rcPaint.left, ps.rcPaint.top,
- ps.rcPaint.right - ps.rcPaint.left + 1,
- ps.rcPaint.bottom - ps.rcPaint.top + 1);
+ ps.rcPaint.right - ps.rcPaint.left,
+ ps.rcPaint.bottom - ps.rcPaint.top);
EndPaint(window, &ps);
return 0;
}
@@ -150,14 +145,12 @@
{
PRECT rect = (PRECT)lParam;
- printf ("WM_SIZING\n");
evas_output_size_set(evas,
- rect->right - rect->left + 1,
- rect->bottom - rect->top + 1);
+ rect->right - rect->left,
+ rect->bottom - rect->top);
return 0;
}
case WM_RBUTTONDOWN:
- printf ("WM_RBUTTONDOWN\n");
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam),
GET_Y_LPARAM(lParam), 0, NULL);
evas_event_feed_mouse_down(evas, 3, EVAS_BUTTON_NONE, 0, NULL);
return 0;
@@ -282,6 +275,7 @@
engine_software_ddraw_args(int argc, char **argv)
{
WNDCLASS wc;
+ RECT rect;
HINSTANCE hinstance;
MSG msg;
LPDIRECTDRAW object;
@@ -317,12 +311,18 @@
if(!RegisterClass(&wc)) return EXIT_FAILURE;
+ rect.left = 0;
+ rect.top = 0;
+ rect.right = win_w;
+ rect.bottom = win_h;
+ AdjustWindowRect (&rect, WS_OVERLAPPEDWINDOW | WS_SIZEBOX, FALSE);
+
window = CreateWindowEx(0,
"Evas_Software_DDraw_Test",
"Evas_Software_DDraw_Test",
WS_OVERLAPPEDWINDOW | WS_SIZEBOX,
CW_USEDEFAULT, CW_USEDEFAULT,
- win_w, win_h,
+ rect.right - rect.left, rect.bottom - rect.top,
NULL, NULL, hinstance, NULL);
if (!window) return EXIT_FAILURE;
@@ -371,7 +371,6 @@
DispatchMessage (&msg);
goto again;
- printf ("fin loop\n");
}
#endif /* HAVE_SOFTWARE_DDRAW */
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs