Revision: 75319
http://sourceforge.net/p/brlcad/code/75319
Author: starseeker
Date: 2020-04-09 15:31:34 +0000 (Thu, 09 Apr 2020)
Log Message:
-----------
Start working on completing dm-wgl.c rework
Modified Paths:
--------------
brlcad/trunk/include/dm/dm_xvars.h
brlcad/trunk/src/libdm/dm-generic.c
brlcad/trunk/src/libdm/dm-wgl.c
Modified: brlcad/trunk/include/dm/dm_xvars.h
===================================================================
--- brlcad/trunk/include/dm/dm_xvars.h 2020-04-09 15:29:03 UTC (rev 75318)
+++ brlcad/trunk/include/dm/dm_xvars.h 2020-04-09 15:31:34 UTC (rev 75319)
@@ -29,6 +29,8 @@
#include "dm.h"
+#include "tk.h" // For X11 types on Windows (config_win.h asserts we have
them...)
+
#ifdef HAVE_X11_XLIB_H
# include <X11/Xlib.h>
# include <X11/Xutil.h>
Modified: brlcad/trunk/src/libdm/dm-generic.c
===================================================================
--- brlcad/trunk/src/libdm/dm-generic.c 2020-04-09 15:29:03 UTC (rev 75318)
+++ brlcad/trunk/src/libdm/dm-generic.c 2020-04-09 15:31:34 UTC (rev 75319)
@@ -27,8 +27,9 @@
#include <string.h>
+#include "dm/dm_xvars.h"
+
#ifdef DM_X
-# include "dm/dm_xvars.h"
# include <X11/Xutil.h>
#endif
@@ -1390,7 +1391,8 @@
int
dm_png_write(dm *UNUSED(dmp), FILE *UNUSED(fp), struct bu_vls *msgs)
{
- bu_vls_printf("PNG output not supported\n");
+ bu_vls_printf(msgs, "PNG output not supported\n");
+ return BRLCAD_OK;
}
#endif // defined(DM_X) || defined(DM_OGL)
Modified: brlcad/trunk/src/libdm/dm-wgl.c
===================================================================
--- brlcad/trunk/src/libdm/dm-wgl.c 2020-04-09 15:29:03 UTC (rev 75318)
+++ brlcad/trunk/src/libdm/dm-wgl.c 2020-04-09 15:31:34 UTC (rev 75319)
@@ -645,14 +645,14 @@
if (pubvars->dpy) {
if (privvars->glxc) {
- wglMakeCurrent(pubvars->hdc, priv_vars->glxc);
+ wglMakeCurrent(pubvars->hdc, privvars->glxc);
wglDeleteContext(privvars->glxc);
}
if (pubvars->cmap)
- XFreeColormap(pub_vars->dpy, pub_vars->cmap);
+ XFreeColormap(pubvars->dpy, pubvars->cmap);
- if (pub_vars->xtkwin) {
+ if (pubvars->xtkwin) {
(*context->dm_eventhandler_delete)(dmp, pubvars->xtkwin);
(*context->dm_window_destroy)(dmp, pubvars->xtkwin);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits