Fixes for Linux for recent commits.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11645 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
e2495a760a
commit
6818216c30
10
src/Fl_x.cxx
10
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) {
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user