~ctwm/ctwm/trunk

« back to all changes in this revision

Viewing changes to otp.c

  • Committer: Matthew Fuller
  • Date: 2017-03-22 23:42:30 UTC
  • mto: This revision was merged to the branch mainline in revision 579.
  • Revision ID: fullermd@over-yonder.net-20170322234230-sfjyaofy7spah2aj
Update f.raiselower backend bits to NWO.  This function doesn't make a
ton of sense, but whatever; it should function as well/poorly as it
did before, I think.

Show diffs side-by-side

added added

removed removed

Lines of Context:
697
697
        OtpWinList *other_owl;
698
698
        int priority;
699
699
 
700
 
        priority = MAX(owl->priority, OTP_MAX - owl->priority);
 
700
        /*
 
701
         * abs(effective pri)
 
702
         * 
 
703
         * XXX Why?  This seems like it's encoding the assumption
 
704
         * "f.raiselower should assume any negative [user-level] priorities
 
705
         * are a result of a window that should be positive being switched,
 
706
         * and we should switch it positive before raising if we need to", or
 
707
         * some such.
 
708
         */
 
709
        priority = MAX(PRI(owl), OTP_MAX - PRI(owl));
701
710
 
702
711
        for(other_owl = owl->above;
703
 
                        (other_owl != NULL) && (other_owl->priority <= priority);
 
712
                        (other_owl != NULL) && (PRI(other_owl) <= priority);
704
713
                        other_owl = other_owl->above) {
705
714
                if(isHiddenBy(owl, other_owl)
706
715
                                && !shouldStayAbove(other_owl, owl)) {