summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2016-04-17 18:07:11 +0000
committerMatthias Melcher <fltk@matthiasm.com>2016-04-17 18:07:11 +0000
commit6818216c3047b7eea83138670f7bb6d02e7314b2 (patch)
tree62c929995781bacf4455228e30d93f81e9bcec05 /src
parente2495a760a7c5987724467923b9beb57c50ccfeb (diff)
Fixes for Linux for recent commits.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11645 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_x.cxx10
-rw-r--r--src/drivers/X11/Fl_X11_Window_Driver.cxx5
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx31
3 files changed, 26 insertions, 20 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 1978545d9..99da7f755 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -321,8 +321,8 @@ XVisualInfo *fl_visual;
Colormap fl_colormap;
static XIM fl_xim_im = 0;
XIC fl_xim_ic = 0;
-static Window fl_xim_win = 0;
-static char fl_is_over_the_spot = 0;
+Window fl_xim_win = 0;
+char fl_is_over_the_spot = 0;
static XRectangle status_area;
static Atom WM_DELETE_WINDOW;
@@ -550,6 +550,10 @@ static void fl_init_xim() {
void fl_xim_deactivate(void);
+extern XRectangle fl_spot;
+extern int fl_spotf;
+extern int fl_spots;
+
void fl_xim_activate(Window xid) {
if (!fl_xim_im)
return;
@@ -568,7 +572,7 @@ void fl_xim_activate(Window xid) {
NULL);
}
- fl_set_spot(spotf, spots, spot.x, spot.y, spot.width, spot.height);
+ fl_set_spot(fl_spotf, fl_spots, fl_spot.x, fl_spot.y, fl_spot.width, fl_spot.height);
}
void fl_xim_deactivate(void) {
diff --git a/src/drivers/X11/Fl_X11_Window_Driver.cxx b/src/drivers/X11/Fl_X11_Window_Driver.cxx
index 187d3ffb9..a6171184c 100644
--- a/src/drivers/X11/Fl_X11_Window_Driver.cxx
+++ b/src/drivers/X11/Fl_X11_Window_Driver.cxx
@@ -48,7 +48,6 @@ extern uchar fl_overlay; // changes how fl_color(x) works
Window fl_window;
-
#if USE_XDBE
#include <X11/extensions/Xdbe.h>
@@ -88,7 +87,7 @@ void Fl_X11_Window_Driver::flush_double_dbe(int erase_overlay)
}
if (i->backbuffer_bad || erase_overlay) {
// Make sure we do a complete redraw...
- if (i->region) {Fl_Graphics_Driver::XDestroyRegion(i->region); i->region = 0;}
+ if (i->region) {Fl_Graphics_Driver::default_driver().XDestroyRegion(i->region); i->region = 0;}
pWindow->clear_damage(FL_DAMAGE_ALL);
i->backbuffer_bad = 0;
}
@@ -471,7 +470,7 @@ void Fl_X11_Window_Driver::show_menu()
void Fl_X11_Window_Driver::hide() {
Fl_X* ip = Fl_X::i(pWindow);
if (hide_common()) return;
- if (ip->region) Fl_Graphics_Driver::XDestroyRegion(ip->region);
+ if (ip->region) Fl_Graphics_Driver::default_driver().XDestroyRegion(ip->region);
# if USE_XFT
Fl_Xlib_Graphics_Driver::destroy_xft_draw(ip->xid);
# endif
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 <X11/extensions/Xrender.h>
#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);