delete pixmap;
#ifdef HAVE_GL
- if( get_resources()->get_synchronous() && top_level->options & GLX_WINDOW ) {
- if( !glx_win ) {
-// NVIDIA library threading problem, XCloseDisplay SEGVs without this
- lock_window("BC_WindowBase::~BC_WindowBase:XDestroyWindow");
- sync_lock("BC_WindowBase::~BC_WindowBase:XDestroyWindow");
- glXMakeContextCurrent(top_level->display, 0, 0, 0);
- XDestroyWindow(top_level->display, win);
- sync_unlock();
- unlock_window();
- }
- else
- get_resources()->get_synchronous()->delete_window(this);
- }
+ if( get_resources()->get_synchronous() &&
+ (top_level->options & GLX_WINDOW) && glx_win != 0 )
+ get_resources()->get_synchronous()->delete_window(this);
else
#endif
XDestroyWindow(top_level->display, win);
init_colors();
// get the resources
if(resources.use_shm < 0) resources.initialize_display(this);
- x_correction = get_resources()->get_left_border();
- y_correction = get_resources()->get_top_border();
+ x_correction = BC_DisplayInfo::get_left_border();
+ y_correction = BC_DisplayInfo::get_top_border();
// clamp window placement
if(this->x + this->w + x_correction > root_w)
if(!(largefont_xft =
(resources.large_font_xft[0] == '-' ?
XftFontOpenXlfd(display, screen, resources.large_font_xft) :
- XftFontOpenXlfd(display, screen, resources.large_font_xft))) )
+ XftFontOpenName(display, screen, resources.large_font_xft))) )
if(!(largefont_xft =
XftFontOpenXlfd(display, screen, resources.large_font_xft2)))
largefont_xft = XftFontOpenXlfd(display, screen, "fixed");
}
}
+void BC_WindowBase::get_root_coordinates(int x, int y, int *abs_x, int *abs_y)
+{
+ translate_coordinates(win, top_level->rootwin, x, y, abs_x, abs_y);
+}
+
+void BC_WindowBase::get_win_coordinates(int abs_x, int abs_y, int *x, int *y)
+{
+ translate_coordinates(top_level->rootwin, win, abs_x, abs_y, x, y);
+}