Compare commits
2 commits
931cff0f6d
...
47c2a74d74
| Author | SHA1 | Date | |
|---|---|---|---|
| 47c2a74d74 | |||
| 4d6d459920 |
2 changed files with 14 additions and 10 deletions
|
|
@ -47,14 +47,14 @@ static void undestroy(MwLL self) {
|
||||||
|
|
||||||
#define WIDGET_CHECK(handle) \
|
#define WIDGET_CHECK(handle) \
|
||||||
if(!handle->wayland.valid) { \
|
if(!handle->wayland.valid) { \
|
||||||
printf("[WARNING] Operation on invalid widget at line %d\n", __LINE__); \
|
/*printf("[WARNING] Operation on invalid widget at line %d\n", __LINE__);*/ \
|
||||||
return; \
|
return; \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Standard procedure before event callbacks in Wayland */
|
/* Standard procedure before event callbacks in Wayland */
|
||||||
#define WAYLAND_EVENT_OP_START(self) \
|
#define WAYLAND_EVENT_OP_START(self) \
|
||||||
if(is_destroyed(self)) { \
|
if(is_destroyed(self)) { \
|
||||||
printf("[WARNING] Operation on invalid widget at line %d\n", __LINE__); \
|
/*printf("[WARNING] Operation on invalid widget at line %d\n", __LINE__);*/ \
|
||||||
return; \
|
return; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -479,6 +479,7 @@ static void pointer_enter(void* data, struct wl_pointer* wl_pointer, MwU32 seria
|
||||||
|
|
||||||
(void)surface_x;
|
(void)surface_x;
|
||||||
(void)surface_y;
|
(void)surface_y;
|
||||||
|
(void)wl_pointer;
|
||||||
|
|
||||||
WAYLAND_EVENT_OP_START(self);
|
WAYLAND_EVENT_OP_START(self);
|
||||||
while(topmost_parent->wayland.parent) topmost_parent = topmost_parent->wayland.parent;
|
while(topmost_parent->wayland.parent) topmost_parent = topmost_parent->wayland.parent;
|
||||||
|
|
@ -1959,10 +1960,6 @@ static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) {
|
||||||
static void MwLLDestroyImpl(MwLL handle) {
|
static void MwLLDestroyImpl(MwLL handle) {
|
||||||
int i;
|
int i;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
struct timespec t = {
|
|
||||||
.tv_sec = 0,
|
|
||||||
.tv_nsec = 0,
|
|
||||||
};
|
|
||||||
int select_ret;
|
int select_ret;
|
||||||
|
|
||||||
event_loop(handle);
|
event_loop(handle);
|
||||||
|
|
|
||||||
|
|
@ -183,12 +183,19 @@ static void func_handler(MwWidget handle, const char* name, void* out, va_list v
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void parent_resize(MwWidget handle) {
|
||||||
|
MwComboBox cb = handle->internal;
|
||||||
|
if(cb->opened) {
|
||||||
|
click(handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MwClassRec MwComboBoxClassRec = {
|
MwClassRec MwComboBoxClassRec = {
|
||||||
wcreate, /* create */
|
wcreate, /* create */
|
||||||
destroy, /* destroy */
|
destroy, /* destroy */
|
||||||
draw, /* draw */
|
draw, /* draw */
|
||||||
click, /* click */
|
click, /* click */
|
||||||
NULL, /* parent_resize */
|
parent_resize, /* parent_resize */
|
||||||
prop_change, /* prop_change */
|
prop_change, /* prop_change */
|
||||||
NULL, /* mouse_move */
|
NULL, /* mouse_move */
|
||||||
MwForceRender2, /* mouse_up */
|
MwForceRender2, /* mouse_up */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue