~ctwm/ctwm/trunk

« back to all changes in this revision

Viewing changes to add_window.c

  • Committer: Matthew Fuller
  • Date: 2022-11-05 02:16:30 UTC
  • mfrom: (700.1.14 dev)
  • Revision ID: fullermd@over-yonder.net-20221105021630-099nb4g6q8skzdw0
Hide WindowBox support behind a build-time option, disabled by
default, to be reaped.

Some code nearby a few of these ifdefs can probably be slightly
simplified once they're gone, but trying to do it conditionally would
be too messy to bother with.

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
#include "session.h"
60
60
#include "util.h"
61
61
#include "vscreen.h"
 
62
#ifdef WINBOX
62
63
#include "windowbox.h"
 
64
#endif
63
65
#include "win_decorations.h"
64
66
#include "win_ops.h"
65
67
#include "win_regions.h"
119
121
        bool restoredFromPrevSession = false;
120
122
        int saved_occupation = 0; /* <== [ Matthew McNeill Feb 1997 ] == */
121
123
        bool random_placed = false;
 
124
#ifdef WINBOX
122
125
        WindowBox *winbox;
 
126
#endif
123
127
        Window vroot;
124
128
 
125
129
#ifdef DEBUG
161
165
        tmp_win->iconmgrp = iconp;
162
166
        tmp_win->iswspmgr = (wtype == AWT_WORKSPACE_MANAGER);
163
167
        tmp_win->isoccupy = (wtype == AWT_OCCUPY);
 
168
#ifdef WINBOX
164
169
        tmp_win->iswinbox = (wtype == AWT_WINDOWBOX);
 
170
#endif
165
171
        tmp_win->vs = vs;
166
172
        tmp_win->parent_vs = vs;
167
173
        tmp_win->savevs = NULL;
671
677
        SetupOccupation(tmp_win, saved_occupation);
672
678
 
673
679
 
 
680
#ifdef WINBOX
674
681
        /* Does it go in a window box? */
675
682
        winbox = findWindowBox(tmp_win);
 
683
#endif
676
684
 
677
685
 
678
686
        /*
738
746
                vroot = Scr->Root;      /* never */
739
747
                tmp_win->parent_vs = Scr->currentvs;
740
748
        }
 
749
#ifdef WINBOX
741
750
        if(winbox) {
742
751
                vroot = winbox->window;
743
752
        }
 
753
#endif
744
754
 
745
755
 
746
756
        /*
980
990
                                        }
981
991
                                        firsttime = false;
982
992
                                }
 
993
#ifdef WINBOX
983
994
                                if(winbox) {
984
995
                                        vroot = winbox->window;
985
996
                                }
 
997
#endif
986
998
 
987
999
                                /*
988
1000
                                 * wait for buttons to come up; yuck
1030
1042
                                           SIZE_VINDENT + Scr->SizeFont.ascent,
1031
1043
                                           tmp_win->name, namelen);
1032
1044
 
 
1045
#ifdef WINBOX
1033
1046
                        if(winbox) {
1034
1047
                                ConstrainedToWinBox(tmp_win, AddingX, AddingY, &AddingX, &AddingY);
1035
1048
                        }
 
1049
#endif
1036
1050
 
1037
1051
                        AddingW = tmp_win->attr.width + bw2 + 2 * tmp_win->frame_bw3D;
1038
1052
                        AddingH = tmp_win->attr.height + tmp_win->title_height +