diff --git a/src/backend/wayland/interfaces.c b/src/backend/wayland/interfaces.c index d7565fd..903e38b 100644 --- a/src/backend/wayland/interfaces.c +++ b/src/backend/wayland/interfaces.c @@ -513,16 +513,19 @@ static void pointer_motion(void* data, struct wl_pointer* wl_pointer, MwU32 time inArea |= self->wayland.backbuffer.surface == curSurface; } + self->wayland.cur_mouse_pos.x = wl_fixed_to_int(surface_x); + self->wayland.cur_mouse_pos.y = wl_fixed_to_int(surface_y); + if(currentlyHeldWidget != NULL){ + currentlyHeldWidget->wayland.cur_mouse_pos.x = wl_fixed_to_int(surface_x); + currentlyHeldWidget->wayland.cur_mouse_pos.y = wl_fixed_to_int(surface_y); + } + if(inArea) { - self->wayland.cur_mouse_pos.x = wl_fixed_to_int(surface_x); - self->wayland.cur_mouse_pos.y = wl_fixed_to_int(surface_y); p.point = self->wayland.cur_mouse_pos; MwLLDispatch(self, move, &p); wl_pointer_set_cursor(self->wayland.pointer, self->wayland.pointer_serial, self->wayland.cursor.surface, 0, 0); } else if(currentlyHeldWidget == self) { - currentlyHeldWidget->wayland.cur_mouse_pos.x = wl_fixed_to_int(surface_x); - currentlyHeldWidget->wayland.cur_mouse_pos.y = wl_fixed_to_int(surface_y); p.point = currentlyHeldWidget->wayland.cur_mouse_pos; MwLLDispatch(currentlyHeldWidget, move, &p); } diff --git a/src/widget/calendar.c b/src/widget/calendar.c index 6e5d3b6..a46c0f3 100644 --- a/src/widget/calendar.c +++ b/src/widget/calendar.c @@ -82,6 +82,7 @@ static MwLLPixmap blit(MwWidget handle, const char* str, MwLLColor bg, MwLLColor static void draw(MwWidget handle) { MwLLColor c = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwLLColor cf = MwParseColor(handle, MwGetText(handle, MwNforeground)); MwLLColor cb = MwParseColor(handle, "#fff"); MwLLColor cb_g = MwParseColor(handle, "#666"); MwLLColor ct = MwParseColor(handle, "#000"); @@ -203,7 +204,7 @@ static void draw(MwWidget handle) { sprintf(buf, "%d", MwGetInteger(handle, MwNyear)); - px = blit(handle, buf, c, ct, gh); + px = blit(handle, buf, c, cf, gh); r2 = r3; r2.width = px->common.width; r2.height = px->common.height; @@ -212,6 +213,7 @@ static void draw(MwWidget handle) { MwLLDrawPixmap(handle->lowlevel, &r2, px); MwLLDestroyPixmap(px); + MwLLFreeColor(cf); MwLLFreeColor(ct); MwLLFreeColor(cb_g); MwLLFreeColor(cb);