Rev 1720 | Rev 1740 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1720 | Rev 1723 | ||
|---|---|---|---|
| Line 828... | Line 828... | ||
| 828 | } |
828 | } |
| 829 | } |
829 | } |
| 830 | 830 | ||
| 831 | 831 | ||
| 832 | static int pointer_x, pointer_y; |
832 | static int pointer_x, pointer_y; |
| 833 | static int pointer_shown; |
833 | static int pointer_shown, pointer_enabled; |
| 834 | static int pointer_vport = -1; |
834 | static int pointer_vport = -1; |
| 835 | static int pointer_pixmap = -1; |
835 | static int pointer_pixmap = -1; |
| 836 | 836 | ||
| 837 | static void mouse_show(void) |
837 | static void mouse_show(void) |
| 838 | { |
838 | { |
| 839 | int i,j; |
839 | int i,j; |
| 840 | int visibility; |
840 | int visibility; |
| 841 | int color; |
841 | int color; |
| 842 | int bytepos; |
842 | int bytepos; |
| 843 | 843 | ||
| - | 844 | if (pointer_shown || !pointer_enabled) |
|
| - | 845 | return; |
|
| - | 846 | ||
| 844 | /* Save image under the cursor */ |
847 | /* Save image under the cursor */ |
| 845 | if (pointer_vport == -1) { |
848 | if (pointer_vport == -1) { |
| 846 | pointer_vport = viewport_create(pointer_x, pointer_y, pointer_width, pointer_height); |
849 | pointer_vport = viewport_create(pointer_x, pointer_y, pointer_width, pointer_height); |
| 847 | if (pointer_vport < 0) |
850 | if (pointer_vport < 0) |
| 848 | return; |
851 | return; |
| Line 1058... | Line 1061... | ||
| 1058 | 1061 | ||
| 1059 | mouse_hide(); |
1062 | mouse_hide(); |
| 1060 | if (!callid) { |
1063 | if (!callid) { |
| 1061 | cursor_blink(vport); |
1064 | cursor_blink(vport); |
| 1062 | anims_tick(); |
1065 | anims_tick(); |
| - | 1066 | mouse_show(); |
|
| 1063 | continue; |
1067 | continue; |
| 1064 | } |
1068 | } |
| 1065 | if (shm_handle(callid, &call, vp)) |
1069 | if (shm_handle(callid, &call, vp)) |
| 1066 | continue; |
1070 | continue; |
| 1067 | if (pixmap_handle(callid, &call, vp)) |
1071 | if (pixmap_handle(callid, &call, vp)) |
| Line 1196... | Line 1200... | ||
| 1196 | break; |
1200 | break; |
| 1197 | case FB_GET_RESOLUTION: |
1201 | case FB_GET_RESOLUTION: |
| 1198 | ipc_answer_fast(callid, 0, screen.xres,screen.yres); |
1202 | ipc_answer_fast(callid, 0, screen.xres,screen.yres); |
| 1199 | continue; |
1203 | continue; |
| 1200 | case FB_POINTER_MOVE: |
1204 | case FB_POINTER_MOVE: |
| - | 1205 | pointer_enabled = 1; |
|
| 1201 | mouse_move(IPC_GET_ARG1(call), IPC_GET_ARG2(call)); |
1206 | mouse_move(IPC_GET_ARG1(call), IPC_GET_ARG2(call)); |
| 1202 | retval = 0; |
1207 | retval = 0; |
| 1203 | break; |
1208 | break; |
| 1204 | default: |
1209 | default: |
| 1205 | retval = ENOENT; |
1210 | retval = ENOENT; |