summaryrefslogtreecommitdiff
path: root/src/Fl_x.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2010-05-27 17:20:18 +0000
committerManolo Gouy <Manolo>2010-05-27 17:20:18 +0000
commit26049351e09d75bdf8b35273a76cf65202583fa7 (patch)
tree010685555b9f83d071a14262e8ce346c7388f254 /src/Fl_x.cxx
parent0a280ce591046f6834f1233087a72fa6bdd97bad (diff)
Better device hierarchy with surfaces and graphics drivers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7617 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_x.cxx')
-rw-r--r--src/Fl_x.cxx19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 1c81503f8..5b7f2c520 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -51,9 +51,11 @@
# include <X11/Xlocale.h>
# include <X11/Xlib.h>
-static Fl_Xlib_Display fl_xlib_device;
-FL_EXPORT Fl_Display *fl_display_device = (Fl_Display*)&fl_xlib_device; // does not change
-FL_EXPORT Fl_Device *fl_device = (Fl_Device*)&fl_xlib_device; // the current target device of graphics operations
+static Fl_Xlib_Graphics_Driver fl_xlib_driver;
+static Fl_Display_Device fl_xlib_display(&fl_xlib_driver);
+FL_EXPORT Fl_Display_Device *fl_display_device = (Fl_Display_Device*)&fl_xlib_display; // does not change
+FL_EXPORT Fl_Graphics_Driver *fl_device = (Fl_Graphics_Driver*)&fl_xlib_driver; // the current target device of graphics operations
+FL_EXPORT Fl_Surface_Device *fl_surface = (Fl_Surface_Device*)fl_display_device; // the current target surface of graphics operations
////////////////////////////////////////////////////////////////
// interface to poll/select call:
@@ -136,9 +138,7 @@ void Fl::add_fd(int n, void (*cb)(int, void*), void* v) {
void Fl::remove_fd(int n, int events) {
int i,j;
-# if !USE_POLL
maxfd = -1; // recalculate maxfd on the fly
-# endif
for (i=j=0; i<nfds; i++) {
# if USE_POLL
if (pollfds[i].fd == n) {
@@ -152,8 +152,8 @@ void Fl::remove_fd(int n, int events) {
if (!e) continue; // if no events left, delete this fd
fd[i].events = e;
}
- if (fd[i].fd > maxfd) maxfd = fd[i].fd;
# endif
+ if (fd[i].fd > maxfd) maxfd = fd[i].fd;
// move it down in the array if necessary:
if (j<i) {
fd[j] = fd[i];
@@ -1588,13 +1588,6 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap)
XFree(hints);
}
- // set the window type for menu and tooltip windows to avoid animations (compiz)
- if (win->menu_window() || win->tooltip_window()) {
- Atom net_wm_type = XInternAtom(fl_display, "_NET_WM_WINDOW_TYPE", False);
- Atom net_wm_type_kind = XInternAtom(fl_display, "_NET_WM_WINDOW_TYPE_MENU", False);
- int ret = XChangeProperty(fl_display, xp->xid, net_wm_type, XA_ATOM, 32, PropModeReplace, (unsigned char*)&net_wm_type_kind, 1);
- }
-
XMapWindow(fl_display, xp->xid);
if (showit) {
win->set_visible();