Changeset 1837 for libcaca/trunk/caca/driver_x11.c
- Timestamp:
- Oct 20, 2007, 12:22:13 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca/driver_x11.c
r1780 r1837 65 65 #endif 66 66 uint32_t max_char; 67 int cursor_flags; 67 68 }; 68 69 … … 243 244 DefaultScreen(dp->drv.p->dpy))); 244 245 dp->drv.p->pointer = None; 246 247 dp->drv.p->cursor_flags = 0; 245 248 246 249 return 0; … … 328 331 *attrs, *chars); 329 332 } 333 } 334 335 /* Print the cursor if necessary */ 336 if(dp->drv.p->cursor_flags) 337 { 338 XSetForeground(dp->drv.p->dpy, dp->drv.p->gc, 339 dp->drv.p->colors[0xfff]); 340 x = cucul_get_cursor_x(dp->cv); 341 y = cucul_get_cursor_y(dp->cv); 342 XFillRectangle(dp->drv.p->dpy, dp->drv.p->pixmap, dp->drv.p->gc, 343 x * dp->drv.p->font_width, y * dp->drv.p->font_height, 344 dp->drv.p->font_width, dp->drv.p->font_height); 330 345 } 331 346 … … 537 552 } 538 553 554 static void x11_set_cursor(caca_display_t *dp, int flags) 555 { 556 dp->drv.p->cursor_flags = flags; 557 } 558 539 559 /* 540 560 * XXX: following functions are local … … 771 791 dp->drv.get_event = x11_get_event; 772 792 dp->drv.set_mouse = x11_set_mouse; 773 dp->drv.set_cursor = NULL;793 dp->drv.set_cursor = x11_set_cursor; 774 794 775 795 return 0;
Note: See TracChangeset
for help on using the changeset viewer.