From 6818216c3047b7eea83138670f7bb6d02e7314b2 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sun, 17 Apr 2016 18:07:11 +0000 Subject: Fixes for Linux for recent commits. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11645 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx | 31 +++++++++++++++------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'src/drivers/Xlib') diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx index 2181e43e0..fbda18630 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx @@ -28,6 +28,9 @@ #include #endif +extern XIC fl_xim_ic; +extern char fl_is_over_the_spot; + /* * By linking this module, the following static method will instantiate the @@ -119,14 +122,14 @@ void Fl_Xlib_Graphics_Driver::fixloop() { // remove equal points from closed pa } // FIXME: should be members of Fl_Xlib_Graphics_Driver -static XRectangle spot; -static int spotf = -1; -static int spots = -1; +XRectangle fl_spot; +int fl_spotf = -1; +int fl_spots = -1; void Fl_Xlib_Graphics_Driver::reset_spot(void) { - spot.x = -1; - spot.y = -1; + fl_spot.x = -1; + fl_spot.y = -1; //if (fl_xim_ic) XUnsetICFocus(fl_xim_ic); } @@ -145,16 +148,16 @@ void Fl_Xlib_Graphics_Driver::set_spot(int font, int size, int X, int Y, int W, 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; + if (X != fl_spot.x || Y != fl_spot.y) { + fl_spot.x = X; + fl_spot.y = Y; + fl_spot.height = H; + fl_spot.width = W; change = 1; } - if (font != spotf || size != spots) { - spotf = font; - spots = size; + if (font != fl_spotf || size != fl_spots) { + fl_spotf = font; + fl_spots = size; change = 1; if (fs) { XFreeFontSet(fl_display, fs); @@ -186,7 +189,7 @@ void Fl_Xlib_Graphics_Driver::set_spot(int font, int size, int X, int Y, int W, preedit_attr = XVaCreateNestedList(0, - XNSpotLocation, &spot, + XNSpotLocation, &fl_spot, XNFontSet, fs, NULL); XSetICValues(fl_xim_ic, XNPreeditAttributes, preedit_attr, NULL); XFree(preedit_attr); -- cgit v1.2.3