diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2016-04-17 14:22:02 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2016-04-17 14:22:02 +0000 |
| commit | cc57af841a11ee314efca6a434ff14bed51706e4 (patch) | |
| tree | f3080908a464e23d2c24c3643a049afc4f449708 /src/Fl_x.cxx | |
| parent | a4e5dc0267bf972b5897aec0f167b3e2d9488a8c (diff) | |
virtualizes fl_set_spot and fl_reset_spot
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11640 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_x.cxx')
| -rw-r--r-- | src/Fl_x.cxx | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 376f230fb..1978545d9 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -489,79 +489,6 @@ static void fl_new_ic() } -static XRectangle spot; -static int spotf = -1; -static int spots = -1; - -void fl_reset_spot(void) -{ - spot.x = -1; - spot.y = -1; - //if (fl_xim_ic) XUnsetICFocus(fl_xim_ic); -} - -void fl_set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win) -{ - int change = 0; - XVaNestedList preedit_attr; - static XFontSet fs = NULL; - char **missing_list; - int missing_count; - char *def_string; - char *fnt = NULL; - bool must_free_fnt =true; - - static XIC ic = NULL; - - if (!fl_xim_ic || !fl_is_over_the_spot) return; - //XSetICFocus(fl_xim_ic); - if (X != spot.x || Y != spot.y) { - spot.x = X; - spot.y = Y; - spot.height = H; - spot.width = W; - change = 1; - } - if (font != spotf || size != spots) { - spotf = font; - spots = size; - change = 1; - if (fs) { - XFreeFontSet(fl_display, fs); - } -#if USE_XFT - -#if defined(__GNUC__) -// FIXME: warning XFT support here -#endif /*__GNUC__*/ - - fnt = NULL; // fl_get_font_xfld(font, size); - if (!fnt) {fnt = (char*)"-misc-fixed-*";must_free_fnt=false;} - fs = XCreateFontSet(fl_display, fnt, &missing_list, - &missing_count, &def_string); -#else - fnt = fl_get_font_xfld(font, size); - if (!fnt) {fnt = (char*)"-misc-fixed-*";must_free_fnt=false;} - fs = XCreateFontSet(fl_display, fnt, &missing_list, - &missing_count, &def_string); -#endif - } - if (fl_xim_ic != ic) { - ic = fl_xim_ic; - change = 1; - } - - if (fnt && must_free_fnt) free(fnt); - if (!change) return; - - - preedit_attr = XVaCreateNestedList(0, - XNSpotLocation, &spot, - XNFontSet, fs, NULL); - XSetICValues(fl_xim_ic, XNPreeditAttributes, preedit_attr, NULL); - XFree(preedit_attr); -} - void fl_set_status(int x, int y, int w, int h) { XVaNestedList status_attr; |
