This commit is contained in:
parent
38d1cb7289
commit
232763a3e3
2 changed files with 10 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue