xtaran / amora-test

Automatically exported from code.google.com/p/amora
0 stars 0 forks source link

See cursor in screenshot #52

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Is't planned to show the cursor on screenshots? Or did I miss something?

Original issue reported on code.google.com by hamstahguru on 8 Feb 2008 at 2:15

GoogleCodeExporter commented 9 years ago
Here's how i fixed it:

in imscreen.c add the following lines 

    int root_x, root_y, win_x, win_y;
    unsigned int mask;
    XGetInputFocus(display, &win, &revert_to);

    XQueryPointer(display,DefaultRootWindow(display), &win, &child,  &root_x, &root_y,
&win_x, &win_y, &mask);

before 

imlib_context_set_anti_alias(1);

and these

imlib_context_set_image(*image);
    imlib_image_draw_ellipse(root_x-win_x,root_y-win_y,4,4);
    imlib_context_set_color(0,0,0,0);
    imlib_image_draw_ellipse(root_x,root_y,3,3);

just after

        *image = imlib_create_image_from_drawable((Pixmap)0, 0, 0,
                          window_attr.width,
                          window_attr.height, 1);

As i'm not an imlib guru, a better method can exist, but that one works pretty 
well

Original comment by hamstahguru on 9 Feb 2008 at 1:05

GoogleCodeExporter commented 9 years ago
Dear Friend

Thanks a lot for the comment. If possible, add a patch (based on trunk version 
of
amora-server) in this message, so I can give it a try.

I realize that is cool to have the cursor draw over the screenshot, but I see 2
distinct problems in this approach:

a) What happens if the cursor is not *over* the current window? You will not 
being
able to draw it.

b) For slide presentations, I don't think as huge advantage see the cursor over 
the
screenshot. Maybe you can think in a case where it makes sense?

Anyway, please feel free to contact us.

Best regards

Adenilson

Original comment by cavalcan...@gmail.com on 10 Feb 2008 at 6:53

GoogleCodeExporter commented 9 years ago

Original comment by cavalcan...@gmail.com on 10 Feb 2008 at 6:54

GoogleCodeExporter commented 9 years ago
I'll post a patch when I have the time.

For issues:

a- If the cursor is not over the current window it wont draw it
b- Why is it a problem with presentations?

I thought about sseing the cursor mainly to know where to click, like buttons or
messagebox, or if you want to draw.

Original comment by hamstahguru on 12 Feb 2008 at 7:46