summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FL/x.H1
-rw-r--r--src/Fl_x.cxx14
-rw-r--r--src/drivers/X11/Fl_X11_Screen_Driver.H1
-rw-r--r--src/drivers/X11/Fl_X11_Screen_Driver.cxx2
-rw-r--r--src/drivers/X11/Fl_X11_Window_Driver.cxx3
5 files changed, 11 insertions, 10 deletions
diff --git a/FL/x.H b/FL/x.H
index 1daa3ba0e..e5e5d8471 100644
--- a/FL/x.H
+++ b/FL/x.H
@@ -135,7 +135,6 @@ public:
void flush() {w->flush();}
static void x(Fl_Window* wi, int X) {wi->x(X);}
static void y(Fl_Window* wi, int Y) {wi->y(Y);}
- static int ewmh_supported();
static void activate_window(Window w);
static void copy_image(const unsigned char* data, int W, int H, int destination = 0);
};
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index cdcbfe4f6..5a784be71 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -2172,7 +2172,7 @@ static void send_wm_state_event(Window wnd, int add, Atom prop) {
add ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE, prop);
}
-int Fl_X::ewmh_supported() {
+int Fl_X11_Screen_Driver::ewmh_supported() {
static int result = -1;
if (result == -1) {
@@ -2215,7 +2215,7 @@ char Fl_Xlib_Graphics_Driver::can_do_alpha_blending() {
extern Fl_Window *fl_xfocus;
void Fl_X::activate_window(Window w) {
- if (!ewmh_supported())
+ if (!Fl_X11_Screen_Driver::ewmh_supported())
return;
Window prev = 0;
@@ -2233,7 +2233,7 @@ void Fl_X::activate_window(Window w) {
/* Change an existing window to fullscreen */
void Fl_X11_Window_Driver::fullscreen_on() {
- if (Fl_X::ewmh_supported()) {
+ if (Fl_X11_Screen_Driver::ewmh_supported()) {
int top, bottom, left, right;
top = fullscreen_screen_top();
@@ -2262,7 +2262,7 @@ void Fl_X11_Window_Driver::fullscreen_on() {
}
void Fl_X11_Window_Driver::fullscreen_off(int X, int Y, int W, int H) {
- if (Fl_X::ewmh_supported()) {
+ if (Fl_X11_Screen_Driver::ewmh_supported()) {
send_wm_state_event(fl_xid(pWindow), 0, fl_NET_WM_STATE_FULLSCREEN);
} else {
pWindow->_clear_fullscreen();
@@ -2403,7 +2403,7 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap)
// since we do not want save_under, do not want to turn off the
// border, and cannot grab without an existing window. Besides,
// there is no clear_override().
- if (win->fullscreen_active() && !Fl_X::ewmh_supported()) {
+ if (win->fullscreen_active() && !Fl_X11_Screen_Driver::ewmh_supported()) {
int sx, sy, sw, sh;
attr.override_redirect = 1;
mask |= CWOverrideRedirect;
@@ -2493,7 +2493,7 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap)
}
// If asked for, create fullscreen
- if (win->fullscreen_active() && Fl_X::ewmh_supported()) {
+ if (win->fullscreen_active() && Fl_X11_Screen_Driver::ewmh_supported()) {
unsigned long data[4];
data[0] = fullscreen_top;
data[1] = fullscreen_bottom;
@@ -2559,7 +2559,7 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap)
}
// non-EWMH fullscreen case, need grab
- if (win->fullscreen_active() && !Fl_X::ewmh_supported()) {
+ if (win->fullscreen_active() && !Fl_X11_Screen_Driver::ewmh_supported()) {
XGrabKeyboard(fl_display, xp->xid, 1, GrabModeAsync, GrabModeAsync, fl_event_time);
}
diff --git a/src/drivers/X11/Fl_X11_Screen_Driver.H b/src/drivers/X11/Fl_X11_Screen_Driver.H
index b974901c0..cc202e881 100644
--- a/src/drivers/X11/Fl_X11_Screen_Driver.H
+++ b/src/drivers/X11/Fl_X11_Screen_Driver.H
@@ -44,6 +44,7 @@ protected:
float dpi[MAX_SCREENS][2];
public:
+ static int ewmh_supported();
// --- display management
virtual void display(const char *disp);
virtual int visual(int flags);
diff --git a/src/drivers/X11/Fl_X11_Screen_Driver.cxx b/src/drivers/X11/Fl_X11_Screen_Driver.cxx
index 881cdcf57..be26205e7 100644
--- a/src/drivers/X11/Fl_X11_Screen_Driver.cxx
+++ b/src/drivers/X11/Fl_X11_Screen_Driver.cxx
@@ -474,7 +474,7 @@ void Fl_X11_Screen_Driver::grab(Fl_Window* win)
} else {
if (Fl::grab()) {
// We must keep the grab in the non-EWMH fullscreen case
- if (!fullscreen_win || Fl_X::ewmh_supported()) {
+ if (!fullscreen_win || ewmh_supported()) {
XUngrabKeyboard(fl_display, fl_event_time);
}
XUngrabPointer(fl_display, fl_event_time);
diff --git a/src/drivers/X11/Fl_X11_Window_Driver.cxx b/src/drivers/X11/Fl_X11_Window_Driver.cxx
index 7cd0c2823..c6784c9cb 100644
--- a/src/drivers/X11/Fl_X11_Window_Driver.cxx
+++ b/src/drivers/X11/Fl_X11_Window_Driver.cxx
@@ -19,6 +19,7 @@
#include "../../config_lib.h"
#include "Fl_X11_Window_Driver.H"
+#include "Fl_X11_Screen_Driver.H"
#include "../Xlib/Fl_Xlib_Graphics_Driver.H"
#include <FL/Fl_Shared_Image.H>
@@ -187,7 +188,7 @@ int Fl_X11_Window_Driver::decorated_w()
void Fl_X11_Window_Driver::take_focus()
{
Fl_X *i = Fl_X::i(pWindow);
- if (!Fl_X::ewmh_supported())
+ if (!Fl_X11_Screen_Driver::ewmh_supported())
pWindow->show(); // Old WMs, XMapRaised
else if (i) // New WMs use the NETWM attribute:
Fl_X::activate_window(i->xid);