1
0
Fork 0

cleanup: Remove unneeded ifdef

As it is just a comment

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3349>
This commit is contained in:
Bilal Elmoussaoui 2023-10-26 11:30:14 +02:00 committed by Marge Bot
parent 51abbb5d4f
commit 57cfd1ab75

View file

@ -38,63 +38,62 @@
#include "core/workspace-private.h" #include "core/workspace-private.h"
#include "meta/prefs.h" #include "meta/prefs.h"
#if 0 /*
// This is the short and sweet version of how to hack on this file; see This is the short and sweet version of how to hack on this file; see
// doc/how-constraints-works.txt for the gory details. The basics of doc/how-constraints-works.txt for the gory details. The basics of
// understanding this file can be shown by the steps needed to add a new understanding this file can be shown by the steps needed to add a new
// constraint, which are: constraint, which are:
// 1) Add a new entry in the ConstraintPriority enum; higher values 1) Add a new entry in the ConstraintPriority enum; higher values
// have higher priority have higher priority
// 2) Write a new function following the format of the example below, 2) Write a new function following the format of the example below,
// "constrain_whatever". "constrain_whatever".
// 3) Add your function to the all_constraints and all_constraint_names 3) Add your function to the all_constraints and all_constraint_names
// arrays (the latter of which is for debugging purposes) arrays (the latter of which is for debugging purposes)
//
// An example constraint function, constrain_whatever: An example constraint function, constrain_whatever:
// ```c
// /* constrain_whatever does the following: // constrain_whatever does the following:
// * Quits (returning true) if priority is higher than PRIORITY_WHATEVER // Quits (returning true) if priority is higher than PRIORITY_WHATEVER
// * If check_only is TRUE // If check_only is TRUE
// * Returns whether the constraint is satisfied or not // Returns whether the constraint is satisfied or not
// * otherwise // otherwise
// * Enforces the constraint // Enforces the constraint
// * Note that the value of PRIORITY_WHATEVER is centralized with the // Note that the value of PRIORITY_WHATEVER is centralized with the
// * priorities of other constraints in the definition of ConstrainPriority // priorities of other constraints in the definition of ConstrainPriority
// * for easier maintenance and shuffling of priorities. // for easier maintenance and shuffling of priorities.
// */ static gboolean
// static gboolean constrain_whatever (MetaWindow *window,
// constrain_whatever (MetaWindow *window, ConstraintInfo *info,
// ConstraintInfo *info, ConstraintPriority priority,
// ConstraintPriority priority, gboolean check_only)
// gboolean check_only) {
// { if (priority > PRIORITY_WHATEVER)
// if (priority > PRIORITY_WHATEVER) return TRUE;
// return TRUE;
// // Determine whether constraint applies; note that if the constraint
// /* Determine whether constraint applies; note that if the constraint // cannot possibly be satisfied, constraint_applies should be set to
// * cannot possibly be satisfied, constraint_applies should be set to // false. If we don't do this, all constraints with a lesser priority
// * false. If we don't do this, all constraints with a lesser priority // will be dropped along with this one, and we'd rather apply as many as
// * will be dropped along with this one, and we'd rather apply as many as // possible.
// * possible. if (!constraint_applies)
// */ return TRUE;
// if (!constraint_applies)
// return TRUE; // Determine whether constraint is already satisfied; if we're only
// // checking the status of whether the constraint is satisfied, we end
// /* Determine whether constraint is already satisfied; if we're only // here.
// * checking the status of whether the constraint is satisfied, we end if (check_only || constraint_already_satisfied)
// * here. return constraint_already_satisfied;
// */
// if (check_only || constraint_already_satisfied) // Enforce constraints
// return constraint_already_satisfied;
// // Note that we exited early if check_only is FALSE; also,
// /* Enforce constraints */ // we know we can return TRUE here because we exited early
// return TRUE; /* Note that we exited early if check_only is FALSE; also, // if the constraint could not be satisfied; not that the
// * we know we can return TRUE here because we exited early // return value is heeded in this case...
// * if the constraint could not be satisfied; not that the return TRUE;
// * return value is heeded in this case... }
// */ ```
// } */
#endif
typedef enum typedef enum
{ {