This commit is contained in:
parent
42faa5691a
commit
af472c625c
3 changed files with 23 additions and 23 deletions
|
|
@ -64,7 +64,7 @@ static inline NSPoint localPointFlip(NSPoint point, NSView* view) {
|
||||||
|
|
||||||
/* Recursively dispatch a key event to a widget and its children */
|
/* Recursively dispatch a key event to a widget and its children */
|
||||||
static void recursive_dispatch_key(MwLL handle, int* k) {
|
static void recursive_dispatch_key(MwLL handle, int* k) {
|
||||||
MwWidget h = (MwWidget)handle->common.intenral;
|
MwWidget h = (MwWidget)handle->common.internal;
|
||||||
MwLLDispatch(handle, key, k);
|
MwLLDispatch(handle, key, k);
|
||||||
if(h) {
|
if(h) {
|
||||||
int i;
|
int i;
|
||||||
|
|
@ -78,7 +78,7 @@ static void recursive_dispatch_key(MwLL handle, int* k) {
|
||||||
};
|
};
|
||||||
/* Recursively dispatch a key released event to a widget and its children */
|
/* Recursively dispatch a key released event to a widget and its children */
|
||||||
static void recursive_dispatch_key_released(MwLL handle, int* k) {
|
static void recursive_dispatch_key_released(MwLL handle, int* k) {
|
||||||
MwWidget h = (MwWidget)handle->common.intenral;
|
MwWidget h = (MwWidget)handle->common.internal;
|
||||||
MwLLDispatch(handle, key_released, k);
|
MwLLDispatch(handle, key_released, k);
|
||||||
if(h) {
|
if(h) {
|
||||||
int i;
|
int i;
|
||||||
|
|
@ -637,7 +637,7 @@ static void recursive_dispatch_key_released(MwLL handle, int* k) {
|
||||||
[topmost_parent->cocoa.real->view setNeedsDisplay:true];
|
[topmost_parent->cocoa.real->view setNeedsDisplay:true];
|
||||||
MwLLDispatch(topmost_parent, draw, NULL);
|
MwLLDispatch(topmost_parent, draw, NULL);
|
||||||
|
|
||||||
h = (MwWidget)topmost_parent->common.intenral;
|
h = (MwWidget)topmost_parent->common.internal;
|
||||||
if(h) {
|
if(h) {
|
||||||
int i;
|
int i;
|
||||||
for(i = 0; i < arrlen(h->children); i++) {
|
for(i = 0; i < arrlen(h->children); i++) {
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ static MwBool hit_detect(MwLL child, MwLL* _topmost_parent, MwPoint* _point, MwP
|
||||||
|
|
||||||
/* Recursively dispatch a key event to a widget and its children */
|
/* Recursively dispatch a key event to a widget and its children */
|
||||||
static void recursive_dispatch_key(MwLL handle, int* k) {
|
static void recursive_dispatch_key(MwLL handle, int* k) {
|
||||||
MwWidget h = (MwWidget)handle->common.intenral;
|
MwWidget h = (MwWidget)handle->common.internal;
|
||||||
MwLLDispatch(handle, key, k);
|
MwLLDispatch(handle, key, k);
|
||||||
if(h) {
|
if(h) {
|
||||||
int i;
|
int i;
|
||||||
|
|
@ -37,7 +37,7 @@ static void recursive_dispatch_key(MwLL handle, int* k) {
|
||||||
};
|
};
|
||||||
/* Recursively dispatch a key released event to a widget and its children */
|
/* Recursively dispatch a key released event to a widget and its children */
|
||||||
static void recursive_dispatch_key_released(MwLL handle, int* k) {
|
static void recursive_dispatch_key_released(MwLL handle, int* k) {
|
||||||
MwWidget h = (MwWidget)handle->common.intenral;
|
MwWidget h = (MwWidget)handle->common.internal;
|
||||||
MwLLDispatch(handle, key_released, k);
|
MwLLDispatch(handle, key_released, k);
|
||||||
if(h) {
|
if(h) {
|
||||||
int i;
|
int i;
|
||||||
|
|
@ -52,7 +52,7 @@ static void recursive_dispatch_key_released(MwLL handle, int* k) {
|
||||||
|
|
||||||
/* Recursively dispatch a move event to a widget and its children */
|
/* Recursively dispatch a move event to a widget and its children */
|
||||||
static void recursive_dispatch_move(MwLL handle, MwMouse* p) {
|
static void recursive_dispatch_move(MwLL handle, MwMouse* p) {
|
||||||
MwWidget h = (MwWidget)handle->common.intenral;
|
MwWidget h = (MwWidget)handle->common.internal;
|
||||||
if(h) {
|
if(h) {
|
||||||
int i;
|
int i;
|
||||||
for(i = 0; i < arrlen(h->children); i++) {
|
for(i = 0; i < arrlen(h->children); i++) {
|
||||||
|
|
@ -165,8 +165,8 @@ static void wl_data_device_leave(void* data,
|
||||||
static MwBool motion_cursor_change(MwLL self, wl_clipboard_device_context_t* ctx) {
|
static MwBool motion_cursor_change(MwLL self, wl_clipboard_device_context_t* ctx) {
|
||||||
if(self->wayland.type == MwLL_WAYLAND_TOPLEVEL && self->wayland.accepts_dnd) {
|
if(self->wayland.type == MwLL_WAYLAND_TOPLEVEL && self->wayland.accepts_dnd) {
|
||||||
return MwTRUE;
|
return MwTRUE;
|
||||||
} else if(self->common.intenral) {
|
} else if(self->common.internal) {
|
||||||
MwWidget w = self->common.intenral;
|
MwWidget w = self->common.internal;
|
||||||
int i, n;
|
int i, n;
|
||||||
for(i = 0; i < arrlen(w->children); i++) {
|
for(i = 0; i < arrlen(w->children); i++) {
|
||||||
if(w->children[i]->lowlevel->wayland.type == MwLL_WAYLAND_SUBLEVEL) {
|
if(w->children[i]->lowlevel->wayland.type == MwLL_WAYLAND_SUBLEVEL) {
|
||||||
|
|
@ -190,8 +190,8 @@ static MwBool motion_cursor_change(MwLL self, wl_clipboard_device_context_t* ctx
|
||||||
static void clipboard_dispatch(MwLL self, char* buf) {
|
static void clipboard_dispatch(MwLL self, char* buf) {
|
||||||
if(self->wayland.type == MwLL_WAYLAND_TOPLEVEL && self->wayland.accepts_dnd) {
|
if(self->wayland.type == MwLL_WAYLAND_TOPLEVEL && self->wayland.accepts_dnd) {
|
||||||
MwLLDispatch(self, drag_and_drop, buf);
|
MwLLDispatch(self, drag_and_drop, buf);
|
||||||
} else if(self->common.intenral) {
|
} else if(self->common.internal) {
|
||||||
MwWidget w = self->common.intenral;
|
MwWidget w = self->common.internal;
|
||||||
int i, n;
|
int i, n;
|
||||||
for(i = 0; i < arrlen(w->children); i++) {
|
for(i = 0; i < arrlen(w->children); i++) {
|
||||||
if(w->children[i]->lowlevel->wayland.type == MwLL_WAYLAND_SUBLEVEL) {
|
if(w->children[i]->lowlevel->wayland.type == MwLL_WAYLAND_SUBLEVEL) {
|
||||||
|
|
@ -722,7 +722,7 @@ static void pointer_motion(void* data, struct wl_pointer* wl_pointer, MwU32 time
|
||||||
};
|
};
|
||||||
|
|
||||||
static void recursive_dispatch_mouse_down(MwLL handle, MwMouse* p) {
|
static void recursive_dispatch_mouse_down(MwLL handle, MwMouse* p) {
|
||||||
MwWidget h = (MwWidget)handle->common.intenral;
|
MwWidget h = (MwWidget)handle->common.internal;
|
||||||
MwLLDispatch(handle, down, p);
|
MwLLDispatch(handle, down, p);
|
||||||
if(h) {
|
if(h) {
|
||||||
int i;
|
int i;
|
||||||
|
|
@ -735,7 +735,7 @@ static void recursive_dispatch_mouse_down(MwLL handle, MwMouse* p) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
static void recursive_dispatch_mouse_up(MwLL handle, MwMouse* p) {
|
static void recursive_dispatch_mouse_up(MwLL handle, MwMouse* p) {
|
||||||
MwWidget h = (MwWidget)handle->common.intenral;
|
MwWidget h = (MwWidget)handle->common.internal;
|
||||||
MwLLDispatch(handle, up, p);
|
MwLLDispatch(handle, up, p);
|
||||||
if(h) {
|
if(h) {
|
||||||
int i;
|
int i;
|
||||||
|
|
@ -793,8 +793,8 @@ static void mouse_dispatch(MwLL self, MwMouse p, MwU32 state) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(self->common.intenral) {
|
if(self->common.internal) {
|
||||||
MwWidget w = self->common.intenral;
|
MwWidget w = self->common.internal;
|
||||||
int i, n;
|
int i, n;
|
||||||
for(i = 0; i < arrlen(w->children); i++) {
|
for(i = 0; i < arrlen(w->children); i++) {
|
||||||
if(w->children[i]->lowlevel->wayland.type == MwLL_WAYLAND_SUBLEVEL) {
|
if(w->children[i]->lowlevel->wayland.type == MwLL_WAYLAND_SUBLEVEL) {
|
||||||
|
|
@ -963,8 +963,8 @@ static void keyboard_leave(void* data,
|
||||||
};
|
};
|
||||||
|
|
||||||
void MwLLRecursiveKeyDispatch(MwLL self, int* k, MwBool down) {
|
void MwLLRecursiveKeyDispatch(MwLL self, int* k, MwBool down) {
|
||||||
if(self->common.intenral) {
|
if(self->common.internal) {
|
||||||
MwWidget w = self->common.intenral;
|
MwWidget w = self->common.internal;
|
||||||
int i, n;
|
int i, n;
|
||||||
for(i = 0; i < arrlen(w->children); i++) {
|
for(i = 0; i < arrlen(w->children); i++) {
|
||||||
if(w->children[i]->lowlevel->wayland.type == MwLL_WAYLAND_SUBLEVEL) {
|
if(w->children[i]->lowlevel->wayland.type == MwLL_WAYLAND_SUBLEVEL) {
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ MwBool MwWaylandVulkan = MwFALSE;
|
||||||
MwBool MwWaylandCairoOnly = MwFALSE;
|
MwBool MwWaylandCairoOnly = MwFALSE;
|
||||||
|
|
||||||
void MwLLWaylandChildrenIterate(MwLL handle, void (*func)(MwLL handle, MwLL child)) {
|
void MwLLWaylandChildrenIterate(MwLL handle, void (*func)(MwLL handle, MwLL child)) {
|
||||||
if(handle->common.intenral) {
|
if(handle->common.internal) {
|
||||||
MwWidget w = handle->common.intenral;
|
MwWidget w = handle->common.internal;
|
||||||
int i;
|
int i;
|
||||||
for(i = 0; i < arrlen(w->children); i++) {
|
for(i = 0; i < arrlen(w->children); i++) {
|
||||||
if(w->children[i]->lowlevel->wayland.type == MwLL_WAYLAND_SUBLEVEL) {
|
if(w->children[i]->lowlevel->wayland.type == MwLL_WAYLAND_SUBLEVEL) {
|
||||||
|
|
@ -30,7 +30,7 @@ static int event_loop(MwLL handle);
|
||||||
|
|
||||||
/* Recursively dispatch a resize event to a widget and its children */
|
/* Recursively dispatch a resize event to a widget and its children */
|
||||||
static void recursive_dispatch_resize(MwLL handle) {
|
static void recursive_dispatch_resize(MwLL handle) {
|
||||||
MwWidget h = (MwWidget)handle->common.intenral;
|
MwWidget h = (MwWidget)handle->common.internal;
|
||||||
if(h) {
|
if(h) {
|
||||||
int i;
|
int i;
|
||||||
for(i = 0; i < arrlen(h->children); i++) {
|
for(i = 0; i < arrlen(h->children); i++) {
|
||||||
|
|
@ -45,7 +45,7 @@ static void recursive_dispatch_resize(MwLL handle) {
|
||||||
static void recursive_render(MwLL handle) {
|
static void recursive_render(MwLL handle) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for(i = 0; i < arrlen(((MwWidget)handle->common.intenral)->children); i++) recursive_render(((MwWidget)handle->common.intenral)->children[i]->lowlevel);
|
for(i = 0; i < arrlen(((MwWidget)handle->common.internal)->children); i++) recursive_render(((MwWidget)handle->common.internal)->children[i]->lowlevel);
|
||||||
|
|
||||||
MwLLForceRender(handle);
|
MwLLForceRender(handle);
|
||||||
}
|
}
|
||||||
|
|
@ -512,7 +512,7 @@ static void setup_popup(MwLL r, int x, int y, MwLL parent) {
|
||||||
r->wayland.popup = malloc(sizeof(struct _MwLLWaylandPopup));
|
r->wayland.popup = malloc(sizeof(struct _MwLLWaylandPopup));
|
||||||
|
|
||||||
if(parent) {
|
if(parent) {
|
||||||
MwWidget p = parent->common.intenral;
|
MwWidget p = parent->common.internal;
|
||||||
while(topmost_parent->wayland.parent) {
|
while(topmost_parent->wayland.parent) {
|
||||||
topmost_parent = topmost_parent->wayland.parent;
|
topmost_parent = topmost_parent->wayland.parent;
|
||||||
}
|
}
|
||||||
|
|
@ -1944,11 +1944,11 @@ static void MwLLRaiseImpl(MwLL handle) {
|
||||||
MwLL topmost_parent = handle;
|
MwLL topmost_parent = handle;
|
||||||
int children_num;
|
int children_num;
|
||||||
while(topmost_parent->wayland.parent) topmost_parent = topmost_parent->wayland.parent;
|
while(topmost_parent->wayland.parent) topmost_parent = topmost_parent->wayland.parent;
|
||||||
children_num = arrlen(((MwWidget)topmost_parent->common.intenral)->children);
|
children_num = arrlen(((MwWidget)topmost_parent->common.internal)->children);
|
||||||
|
|
||||||
if(children_num > 1) {
|
if(children_num > 1) {
|
||||||
printf("%d\n", children_num);
|
printf("%d\n", children_num);
|
||||||
MwWidget last_child = ((MwWidget)topmost_parent->common.intenral)->children[children_num - 1];
|
MwWidget last_child = ((MwWidget)topmost_parent->common.internal)->children[children_num - 1];
|
||||||
wl_subsurface_place_above(handle->wayland.sublevel->subsurface, last_child->lowlevel->wayland.framebuffer.surface);
|
wl_subsurface_place_above(handle->wayland.sublevel->subsurface, last_child->lowlevel->wayland.framebuffer.surface);
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue