Revision: 75302
          http://sourceforge.net/p/brlcad/code/75302
Author:   starseeker
Date:     2020-04-08 17:37:43 +0000 (Wed, 08 Apr 2020)
Log Message:
-----------
use context in X_close

Modified Paths:
--------------
    brlcad/trunk/src/libdm/dm-X.c

Modified: brlcad/trunk/src/libdm/dm-X.c
===================================================================
--- brlcad/trunk/src/libdm/dm-X.c       2020-04-08 17:34:49 UTC (rev 75301)
+++ brlcad/trunk/src/libdm/dm-X.c       2020-04-08 17:37:43 UTC (rev 75302)
@@ -280,7 +280,7 @@
 
 
 HIDDEN XVisualInfo *
-X_choose_visual(struct dm_internal *dmp)
+X_choose_visual(struct dm_internal *dmp, struct dm_context *context)
 {
     XVisualInfo *vip, vitemp, *vibase, *maxvip;
     int num, i, j;
@@ -342,10 +342,7 @@
            }
 
 #ifdef HAVE_TK
-           if (Tk_SetWindowVisual(pubvars->xtkwin,
-                                  maxvip->visual,
-                                  maxvip->depth,
-                                  pubvars->cmap)) {
+           if ((*context->dm_window_set_visual)(dmp, pubvars->xtkwin, 
(dm_visual_info)maxvip, pubvars->cmap)) {
                pubvars->depth = maxvip->depth;
 
                bu_free(good, "dealloc good visuals");
@@ -376,7 +373,7 @@
  * Gracefully release the display.
  */
 HIDDEN int
-X_close(struct dm_internal *dmp, struct dm_context *UNUSED(context))
+X_close(struct dm_internal *dmp, struct dm_context *context)
 {
     struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars;
     struct x_vars *privars = (struct x_vars *)dmp->dm_vars.priv_vars;
@@ -399,7 +396,7 @@
 
 #ifdef HAVE_TK
        if (pubvars->xtkwin)
-           Tk_DestroyWindow(pubvars->xtkwin);
+           (*context->dm_window_destroy)(dmp, pubvars->xtkwin);
 #endif
 
     }
@@ -612,7 +609,7 @@
 #endif
 
     /* must do this before MakeExist */
-    if ((pubvars->vip = X_choose_visual(dmp)) == NULL) {
+    if ((pubvars->vip = X_choose_visual(dmp, context)) == NULL) {
        bu_log("X_open_dm: Can't get an appropriate visual.\n");
        (void)X_close(dmp, context);
        return DM_NULL;
@@ -748,7 +745,7 @@
     (void)X_configureWin_guts(dmp, 1);
 
 #ifdef HAVE_TK
-    Tk_SetWindowBackground(pubvars->xtkwin,
+    Tk_SetWindowBackground((Tk_Window)pubvars->xtkwin,
                           privars->bg);
     (*context->dm_window_map)(dmp, pubvars->xtkwin);
 #endif

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

Reply via email to