summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-04-16 11:02:35 +0000
committerManolo Gouy <Manolo>2016-04-16 11:02:35 +0000
commitd3d7597484394d43f9b88dbdcfa2e993d14621d3 (patch)
tree88956249e60ced5ca8332c90e5f5172f758fab6c /src
parent083e9ed06aa8c9862abad7eabdcf5ad5782da8eb (diff)
Continue removing non window-related member-functions from class Fl_X.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11630 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-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
4 files changed, 11 insertions, 9 deletions
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);