fixed bugs in some structure events
fixed a bug in client-message-event
This commit is contained in:
parent
c72b51e58e
commit
ad89f01b78
|
@ -145,21 +145,24 @@ s48_value scx_enter_create_window_event(XCreateWindowEvent* xe) {
|
||||||
|
|
||||||
s48_value scx_enter_destroy_window_event(XDestroyWindowEvent* xe) {
|
s48_value scx_enter_destroy_window_event(XDestroyWindowEvent* xe) {
|
||||||
EENTER_START("scx-destroy-window-event");
|
EENTER_START("scx-destroy-window-event");
|
||||||
EENTER(4, window, scx_enter_window);
|
EENTER(4, event, scx_enter_window);
|
||||||
|
EENTER(5, window, scx_enter_window);
|
||||||
EENTER_END();
|
EENTER_END();
|
||||||
}
|
}
|
||||||
|
|
||||||
s48_value scx_enter_unmap_event(XUnmapEvent* xe) {
|
s48_value scx_enter_unmap_event(XUnmapEvent* xe) {
|
||||||
EENTER_START("scx-unmap-event");
|
EENTER_START("scx-unmap-event");
|
||||||
EENTER(4, window, scx_enter_window);
|
EENTER(4, event, scx_enter_window);
|
||||||
EENTER(5, from_configure, S48_ENTER_BOOLEAN);
|
EENTER(5, window, scx_enter_window);
|
||||||
|
EENTER(6, from_configure, S48_ENTER_BOOLEAN);
|
||||||
EENTER_END();
|
EENTER_END();
|
||||||
}
|
}
|
||||||
|
|
||||||
s48_value scx_enter_map_event(XMapEvent* xe) {
|
s48_value scx_enter_map_event(XMapEvent* xe) {
|
||||||
EENTER_START("scx-map-event");
|
EENTER_START("scx-map-event");
|
||||||
EENTER(4, window, scx_enter_window);
|
EENTER(4, event, scx_enter_window);
|
||||||
EENTER(5, override_redirect, S48_ENTER_BOOLEAN);
|
EENTER(5, window, scx_enter_window);
|
||||||
|
EENTER(6, override_redirect, S48_ENTER_BOOLEAN);
|
||||||
EENTER_END();
|
EENTER_END();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -524,21 +527,24 @@ void scx_extract_create_window_event(s48_value e, XCreateWindowEvent* xe) {
|
||||||
|
|
||||||
void scx_extract_destroy_window_event(s48_value e, XDestroyWindowEvent* xe) {
|
void scx_extract_destroy_window_event(s48_value e, XDestroyWindowEvent* xe) {
|
||||||
EEXTRACT_START("scx-destroy-window-event");
|
EEXTRACT_START("scx-destroy-window-event");
|
||||||
EEXTRACT(4, window, scx_extract_window);
|
EEXTRACT(4, event, scx_extract_window);
|
||||||
|
EEXTRACT(5, window, scx_extract_window);
|
||||||
EEXTRACT_END();
|
EEXTRACT_END();
|
||||||
}
|
}
|
||||||
|
|
||||||
void scx_extract_unmap_event(s48_value e, XUnmapEvent* xe) {
|
void scx_extract_unmap_event(s48_value e, XUnmapEvent* xe) {
|
||||||
EEXTRACT_START("scx-unmap-event");
|
EEXTRACT_START("scx-unmap-event");
|
||||||
EEXTRACT(4, window, scx_extract_window);
|
EEXTRACT(4, event, scx_extract_window);
|
||||||
EEXTRACT(5, from_configure, S48_EXTRACT_BOOLEAN);
|
EEXTRACT(5, window, scx_extract_window);
|
||||||
|
EEXTRACT(6, from_configure, S48_EXTRACT_BOOLEAN);
|
||||||
EEXTRACT_END();
|
EEXTRACT_END();
|
||||||
}
|
}
|
||||||
|
|
||||||
void scx_extract_map_event(s48_value e, XMapEvent* xe) {
|
void scx_extract_map_event(s48_value e, XMapEvent* xe) {
|
||||||
EEXTRACT_START("scx-map-event");
|
EEXTRACT_START("scx-map-event");
|
||||||
EEXTRACT(4, window, scx_extract_window);
|
EEXTRACT(4, event, scx_extract_window);
|
||||||
EEXTRACT(5, override_redirect, S48_EXTRACT_BOOLEAN);
|
EEXTRACT(5, window, scx_extract_window);
|
||||||
|
EEXTRACT(6, override_redirect, S48_EXTRACT_BOOLEAN);
|
||||||
EEXTRACT_END();
|
EEXTRACT_END();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -675,13 +681,16 @@ void scx_extract_colormap_event(s48_value e, XColormapEvent* xe) {
|
||||||
|
|
||||||
void scx_extract_client_message_event(s48_value e, XClientMessageEvent* xe) {
|
void scx_extract_client_message_event(s48_value e, XClientMessageEvent* xe) {
|
||||||
int nelements, i;
|
int nelements, i;
|
||||||
char* data;
|
char* data; int bytes;
|
||||||
EEXTRACT_START("scx-client-message-event");
|
EEXTRACT_START("scx-client-message-event");
|
||||||
EEXTRACT(4, window, scx_extract_window);
|
EEXTRACT(4, window, scx_extract_window);
|
||||||
scx_extract_property(S48_RECORD_REF(e, 5), &xe->message_type, &xe->format,
|
scx_extract_property(S48_RECORD_REF(e, 5), &xe->message_type, &xe->format,
|
||||||
&data, &nelements);
|
&data, &nelements);
|
||||||
|
if (xe->format == 32) bytes = nelements * 4;
|
||||||
|
else if (xe->format == 16) bytes = nelements * 2;
|
||||||
|
else bytes = nelements;
|
||||||
for (i = 0; i < 20; i++)
|
for (i = 0; i < 20; i++)
|
||||||
if (i < nelements)
|
if (i < bytes)
|
||||||
xe->data.b[i] = data[i];
|
xe->data.b[i] = data[i];
|
||||||
else
|
else
|
||||||
xe->data.b[i] = 0;
|
xe->data.b[i] = 0;
|
||||||
|
|
Loading…
Reference in New Issue