Commit 7e62a5f5 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

backported sys_queuegui changes from 0.46

implemented iemgui "pos" method
parent 8c479190
......@@ -2246,6 +2246,12 @@ return;
}
}
function elem_move(elem, x, y) {
var t = elem.transform.baseVal.getItem(0);
t.matrix.e = x;
t.matrix.f = y;
}
function elem_displace(elem, dx, dy) {
var t = elem.transform.baseVal.getItem(0);
t.matrix.e += dx;
......@@ -2702,8 +2708,10 @@ function gui_iemgui_drawborder(cid, tag, bgcolor, x1, y1, x2, y2) {
g.appendChild(rect);
}
function gui_iemgui_redraw_border(cid, tag, x1, y1, x2, y2) {
var item = get_gobj(cid, tag).querySelector('.border');
function gui_iemgui_move_and_resize(cid, tag, x1, y1, x2, y2) {
var gobj = get_gobj(cid, tag);
var item = gobj.querySelector('.border');
elem_move(gobj, x1, y1);
configure_item(item, {
width: x2 - x1,
height: y2 - y1
......
......@@ -1228,7 +1228,7 @@ void iemgui_base_draw_move(t_iemgui *x) {
c->c_wb->w_getrectfn((t_gobj *)x,x->x_glist,&x1,&y1,&x2,&y2);
gop_redraw=gr;
//sys_vgui(".x%lx.c coords %lxBASE %d %d %d %d\n", canvas, x, x1, y1, x2, y2);
gui_vmess("gui_iemgui_redraw_border", "xxiiii",
gui_vmess("gui_iemgui_move_and_resize", "xxiiii",
canvas, x, x1, y1, x2, y2);
}
......
......@@ -1006,14 +1006,14 @@ void sys_queuegui(void *client, t_glist *glist, t_guicallbackfn f)
void sys_unqueuegui(void *client)
{
t_guiqueue *gq, *gq2;
if (!sys_guiqueuehead)
return;
while (sys_guiqueuehead->gq_client == client)
while (sys_guiqueuehead && sys_guiqueuehead->gq_client == client)
{
gq = sys_guiqueuehead;
sys_guiqueuehead = sys_guiqueuehead->gq_next;
t_freebytes(gq, sizeof(*gq));
}
if (!sys_guiqueuehead)
return;
for (gq = sys_guiqueuehead; gq2 = gq->gq_next; gq = gq2)
if (gq2->gq_client == client)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment