Enlightenment CVS committal Author : sebastid Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x Modified Files: Ecore_X.h Ecore_X_Atoms.h ecore_x.c ecore_x_events.c Log Message: Add movresize event. State -> State_Request =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v retrieving revision 1.119 retrieving revision 1.120 diff -u -3 -r1.119 -r1.120 --- Ecore_X.h 17 May 2005 12:23:15 -0000 1.119 +++ Ecore_X.h 28 May 2005 12:49:40 -0000 1.120 @@ -239,7 +239,8 @@ typedef struct _Ecore_X_Event_Xdnd_Leave Ecore_X_Event_Xdnd_Leave; typedef struct _Ecore_X_Event_Xdnd_Drop Ecore_X_Event_Xdnd_Drop; typedef struct _Ecore_X_Event_Xdnd_Finished Ecore_X_Event_Xdnd_Finished; -typedef struct _Ecore_X_Event_Window_State Ecore_X_Event_Window_State; +typedef struct _Ecore_X_Event_Window_Move_Resize_Request Ecore_X_Event_Window_Move_Resize_Request; +typedef struct _Ecore_X_Event_Window_State_Request Ecore_X_Event_Window_State_Request; typedef struct _Ecore_X_Event_Desktop_Change Ecore_X_Event_Desktop_Change; typedef struct _Ecore_X_Event_Client_Message Ecore_X_Event_Client_Message; typedef struct _Ecore_X_Event_Window_Shape Ecore_X_Event_Window_Shape; @@ -599,7 +600,16 @@ Ecore_X_Atom action; }; -struct _Ecore_X_Event_Window_State +struct _Ecore_X_Event_Window_Move_Resize_Request +{ + Ecore_X_Window win; + int x, y; + int direction; + int button; + int source; +}; + +struct _Ecore_X_Event_Window_State_Request { Ecore_X_Window win; Ecore_X_Window_State_Action action; @@ -727,7 +737,8 @@ extern EAPI int ECORE_X_EVENT_SELECTION_CLEAR; extern EAPI int ECORE_X_EVENT_SELECTION_REQUEST; extern EAPI int ECORE_X_EVENT_SELECTION_NOTIFY; -extern EAPI int ECORE_X_EVENT_WINDOW_STATE; +extern EAPI int ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST; +extern EAPI int ECORE_X_EVENT_WINDOW_STATE_REQUEST; extern EAPI int ECORE_X_EVENT_DESKTOP_CHANGE; extern EAPI int ECORE_X_EVENT_CLIENT_MESSAGE; extern EAPI int ECORE_X_EVENT_WINDOW_SHAPE; =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Ecore_X_Atoms.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- Ecore_X_Atoms.h 16 May 2005 12:59:26 -0000 1.8 +++ Ecore_X_Atoms.h 28 May 2005 12:49:40 -0000 1.9 @@ -75,6 +75,9 @@ extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_HANDLED_ICONS; extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_USER_TIME; +extern Ecore_X_Atom ECORE_X_ATOM_NET_CLOSE_WINDOW; +extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_MOVERESIZE; + extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS; extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MOVE; extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_RESIZE; =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x.c,v retrieving revision 1.83 retrieving revision 1.84 diff -u -3 -r1.83 -r1.84 --- ecore_x.c 22 May 2005 03:01:59 -0000 1.83 +++ ecore_x.c 28 May 2005 12:49:40 -0000 1.84 @@ -113,7 +113,8 @@ int ECORE_X_EVENT_SELECTION_CLEAR = 0; int ECORE_X_EVENT_SELECTION_REQUEST = 0; int ECORE_X_EVENT_SELECTION_NOTIFY = 0; -int ECORE_X_EVENT_WINDOW_STATE = 0; +int ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST = 0; +int ECORE_X_EVENT_WINDOW_STATE_REQUEST = 0; int ECORE_X_EVENT_DESKTOP_CHANGE = 0; int ECORE_X_EVENT_CLIENT_MESSAGE = 0; int ECORE_X_EVENT_WINDOW_SHAPE = 0; @@ -256,7 +257,8 @@ ECORE_X_EVENT_SELECTION_CLEAR = ecore_event_type_new(); ECORE_X_EVENT_SELECTION_REQUEST = ecore_event_type_new(); ECORE_X_EVENT_SELECTION_NOTIFY = ecore_event_type_new(); - ECORE_X_EVENT_WINDOW_STATE = ecore_event_type_new(); + ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST = ecore_event_type_new(); + ECORE_X_EVENT_WINDOW_STATE_REQUEST = ecore_event_type_new(); ECORE_X_EVENT_DESKTOP_CHANGE = ecore_event_type_new(); ECORE_X_EVENT_CLIENT_MESSAGE = ecore_event_type_new(); ECORE_X_EVENT_WINDOW_SHAPE = ecore_event_type_new(); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_events.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -3 -r1.59 -r1.60 --- ecore_x_events.c 20 May 2005 09:22:10 -0000 1.59 +++ ecore_x_events.c 28 May 2005 12:49:40 -0000 1.60 @@ -1135,9 +1135,9 @@ /* checks here and generate synthetic events per special message known */ /* otherwise generate generic client message event. this would handle*/ /* netwm, ICCCM, gnomewm, old kde and mwm hint client message protocols */ - if ((xevent->xclient.message_type == ECORE_X_ATOM_WM_PROTOCOLS) - && (xevent->xclient.format == 32) - && (xevent->xclient.data.l[0] == (long)ECORE_X_ATOM_WM_DELETE_WINDOW)) + if ((xevent->xclient.message_type == ECORE_X_ATOM_WM_PROTOCOLS) && + (xevent->xclient.format == 32) && + (xevent->xclient.data.l[0] == (long)ECORE_X_ATOM_WM_DELETE_WINDOW)) { Ecore_X_Event_Window_Delete_Request *e; @@ -1148,6 +1148,24 @@ ecore_event_add(ECORE_X_EVENT_WINDOW_DELETE_REQUEST, e, NULL, NULL); } + else if ((xevent->xclient.message_type == ECORE_X_ATOM_NET_WM_MOVERESIZE) && + (xevent->xclient.format == 32) && + /* Ignore move and resize with keyboard */ + (xevent->xclient.data.l[2] < 9)) + { + Ecore_X_Event_Window_Move_Resize_Request *e; + + e = calloc(1, sizeof(Ecore_X_Event_Window_Move_Resize_Request)); + if (!e) return; + e->win = xevent->xclient.window; + e->x = xevent->xclient.data.l[0]; + e->y = xevent->xclient.data.l[1]; + e->direction = xevent->xclient.data.l[2]; + e->button = xevent->xclient.data.l[3]; + e->source = xevent->xclient.data.l[4]; + ecore_event_add(ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST, e, NULL, NULL); + } + /* Xdnd Client Message Handling Begin */ /* Message Type: XdndEnter target */ else if (xevent->xclient.message_type == ECORE_X_ATOM_XDND_ENTER) @@ -1373,9 +1391,9 @@ } else if (xevent->xclient.message_type == ECORE_X_ATOM_NET_WM_STATE) { - Ecore_X_Event_Window_State *e; + Ecore_X_Event_Window_State_Request *e; - e = calloc(1, sizeof(Ecore_X_Event_Window_State)); + e = calloc(1, sizeof(Ecore_X_Event_Window_State_Request)); if (!e) return; e->win = xevent->xclient.window; if (xevent->xclient.data.l[0] == 0) @@ -1409,21 +1427,21 @@ } e->source = xevent->xclient.data.l[3]; - ecore_event_add(ECORE_X_EVENT_WINDOW_STATE, e, NULL, NULL); + ecore_event_add(ECORE_X_EVENT_WINDOW_STATE_REQUEST, e, NULL, NULL); } else if ((xevent->xclient.message_type == ECORE_X_ATOM_WM_CHANGE_STATE) && (xevent->xclient.format == 32) && (xevent->xclient.data.l[0] == IconicState)) { - Ecore_X_Event_Window_State *e; + Ecore_X_Event_Window_State_Request *e; - e = calloc(1, sizeof(Ecore_X_Event_Window_State)); + e = calloc(1, sizeof(Ecore_X_Event_Window_State_Request)); if (!e) return; e->win = xevent->xclient.window; e->action = ECORE_X_WINDOW_STATE_ACTION_ADD; e->state[0] = ECORE_X_WINDOW_STATE_ICONIFIED; - ecore_event_add(ECORE_X_EVENT_WINDOW_STATE, e, NULL, NULL); + ecore_event_add(ECORE_X_EVENT_WINDOW_STATE_REQUEST, e, NULL, NULL); } else if ((xevent->xclient.message_type == ECORE_X_ATOM_NET_WM_DESKTOP) && (xevent->xclient.format == 32)) ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs