~ctwm/ctwm/trunk

« back to all changes in this revision

Viewing changes to otp.c

  • Committer: Matthew Fuller
  • Date: 2022-11-05 02:09:11 UTC
  • mto: This revision was merged to the branch mainline in revision 702.
  • Revision ID: fullermd@over-yonder.net-20221105020911-fgdqeg4ozms4wlw3
Hide these TwmWindow winbox-related fields behind an ifdef along with
the code manipulating them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
293
293
                        nwins++;
294
294
                }
295
295
 
 
296
#ifdef WINBOX
296
297
                if(twm_win->winbox) {
297
298
                        /*
298
299
                         * We can't check windows in a WindowBox, since they are
301
302
                        DPRINTF((stderr, "Can't check this window, it is in a WinBox\n"));
302
303
                        continue;
303
304
                }
 
305
#endif
304
306
 
305
307
                /*
306
308
                 * Check only windows from the current vitual screen; the others
382
384
        return owl;
383
385
}
384
386
 
 
387
#ifdef WINBOX
385
388
/*
386
389
 * Windows in a box don't really occur in the stacking order of the
387
390
 * root window.
406
409
        }
407
410
        return owl;
408
411
}
 
412
#endif
409
413
 
410
414
 
411
415
static void InsertOwlAbove(OtpWinList *owl, OtpWinList *other_owl)
444
448
                Scr->bottomOwl = owl;
445
449
        }
446
450
        else {
 
451
#ifdef WINBOX
447
452
                WindowBox *winbox = owl->twm_win->winbox;
 
453
#endif
448
454
                OtpWinList *vs_owl;
449
455
 
450
 
                if(winbox != NULL) {
 
456
                if(false) {
 
457
                        // dummy
 
458
                }
 
459
#ifdef WINBOX
 
460
                else if(winbox != NULL) {
451
461
                        vs_owl = GetOwlAtOrBelowInWinbox(&other_owl, winbox);
452
462
                }
 
463
#endif
453
464
                else {
454
465
 
455
466
                        vs_owl = GetOwlAtOrBelowInVS(other_owl, owl->twm_win->parent_vs);
888
899
        DPRINTF((stderr, "OtpSetPriority: new_pri=%d\n", new_pri));
889
900
        assert(owl != NULL);
890
901
 
 
902
#ifdef WINBOX
891
903
        if(twm_win->winbox != NULL || twm_win->iswinbox) {
892
904
                return;
893
905
        }
 
906
#endif
894
907
 
895
908
        if(ABS(new_pri) > OTP_ZERO) {
896
909
                DPRINTF((stderr, "invalid OnTopPriority value: %d\n", new_pri));
910
923
        int priority = owl->pri_base + relpriority;
911
924
        int where;
912
925
 
 
926
#ifdef WINBOX
913
927
        if(twm_win->winbox != NULL || twm_win->iswinbox) {
914
928
                return;
915
929
        }
 
930
#endif
916
931
 
917
932
        where = relpriority < 0 ? Below : Above;
918
933
 
931
946
 
932
947
        assert(owl != NULL);
933
948
 
 
949
#ifdef WINBOX
934
950
        if(twm_win->winbox != NULL || twm_win->iswinbox) {
935
951
                return;
936
952
        }
 
953
#endif
937
954
 
938
955
        where = priority < OTP_ZERO ? Below : Above;
939
956
        TryToMoveTransientsOfTo(owl, priority, where);
948
965
        OtpWinList *owl = (wintype == IconWin) ? twm_win->icon->otp : twm_win->otp;
949
966
        assert(owl != NULL);
950
967
 
 
968
#ifdef WINBOX
951
969
        if(twm_win->winbox != NULL || twm_win->iswinbox) {
952
970
                return;
953
971
        }
 
972
#endif
954
973
 
955
974
        owl->switching = !owl->switching;
956
975
 
1209
1228
 
1210
1229
        assert(*owlp == NULL);
1211
1230
 
1212
 
        /* windows in boxes *must* inherit priority from the box */
1213
 
        if(twm_win->winbox) {
 
1231
        if(false) {
 
1232
                // dummy
 
1233
        }
 
1234
#ifdef WINBOX
 
1235
        else if(twm_win->winbox) {
 
1236
                /* windows in boxes *must* inherit priority from the box */
1214
1237
                parent = twm_win->winbox->twmwin->otp;
1215
1238
                parent->switching = false;
1216
1239
        }
 
1240
#endif
1217
1241
        /* in case it's a transient, find the parent */
1218
1242
        else if(wintype == WinWin && (twm_win->istransient
1219
1243
                                      || !isGroupLeader(twm_win))) {