summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2016-02-19 22:43:40 +0000
committerMatthias Melcher <fltk@matthiasm.com>2016-02-19 22:43:40 +0000
commit093c0c7f738dd3dd9b73ea81e488e8aab0a6fa60 (patch)
treec997e9685d5a71481170a96033122ea3daea72ee
parent399501783ccd867559c954d91a00f7d5d7ec4cb8 (diff)
Fixes for X11
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11197 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--FL/x.H4
-rw-r--r--src/Fl_x.cxx4
-rw-r--r--src/drivers/X11/Fl_X11_Window_Driver.cxx5
3 files changed, 6 insertions, 7 deletions
diff --git a/FL/x.H b/FL/x.H
index 46d276952..da5b3cb91 100644
--- a/FL/x.H
+++ b/FL/x.H
@@ -143,8 +143,8 @@ public:
char wait_for_expose;
char backbuffer_bad; // used for XDBE
static Fl_X* first;
- static Fl_X* i(const Fl_Window* wi) {return wi->i;}
- void setwindow(Fl_Window* wi) {w=wi; wi->i=this;}
+ static Fl_X* i(const Fl_Window* wi) {return (Fl_X*)wi->i;}
+ void setwindow(Fl_Window* wi) {w=wi; wi->i=(Fl_Window_Driver*)this;}
void sendxjunk();
static void set_default_icons(const Fl_RGB_Image*[], int);
void set_icons();
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index bffb343d1..ddcb569e7 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -36,7 +36,7 @@ class Fl_Widget *fl_selection_requestor;
# include <config.h>
# include <FL/Fl.H>
-# include <FL/x.H>
+# include <FL/Fl_Window_Driver.H>
# include <FL/Fl_Window.H>
# include <FL/fl_utf8.h>
# include <FL/Fl_Tooltip.H>
@@ -2285,7 +2285,7 @@ void Fl_Window::fullscreen_off_x(int X, int Y, int W, int H) {
void fl_fix_focus(); // in Fl.cxx
Fl_X* Fl_X::set_xid(Fl_Window* win, Window winxid) {
- Fl_Window_Driver *x = Fl_Window_Driver::newWindowDriver(win);
+ Fl_Window_Driver *xp = Fl_Window_Driver::newWindowDriver(win);
xp->xid = winxid;
xp->other_xid = 0;
xp->setwindow(win);
diff --git a/src/drivers/X11/Fl_X11_Window_Driver.cxx b/src/drivers/X11/Fl_X11_Window_Driver.cxx
index f6e748ca8..e145d99c6 100644
--- a/src/drivers/X11/Fl_X11_Window_Driver.cxx
+++ b/src/drivers/X11/Fl_X11_Window_Driver.cxx
@@ -36,10 +36,9 @@ Fl_X11_Window_Driver::Fl_X11_Window_Driver(Fl_Window *win)
void Fl_X11_Window_Driver::take_focus()
{
if (!Fl_X::ewmh_supported())
- win->show(); // Old WMs, XMapRaised
+ w->show(); // Old WMs, XMapRaised
else if (x) // New WMs use the NETWM attribute:
- Fl_X::activate_window(x->xid);
- }
+ Fl_X::activate_window(xid);
}