
700 S.W.2d 734 (1985)
JOHN M. GILLIS, P.C., Appellant,
v.
Craig Gibson WILBUR, Appellee.
No. 05-84-01286-CV.
Court of Appeals of Texas, Dallas.
November 20, 1985.
Rehearing Denied December 23, 1985.
*735 John M. Gillis, Virgil E. Rogers, Dallas, for appellant.
Douglas W. Brady, Dallas, for appellee.
Before GUITTARD, C.J., and AKIN and ALLEN, JJ.
ALLEN, Justice.
This is an appeal from an order granting summary judgment for appellee Craig Wilbur on appellant Gillis's claim for attorney's fees. In a single point of error, Gillis contends that the trial court erred in granting the summary judgment on the ground that Gillis's claim was barred by res judicata. We disagree with appellant's contention and, consequently, affirm the judgment of the trial court.
The relevant facts of this cause are not in dispute. Attorney Gillis represented Craig's former wife, Karen, in her divorce action against Craig. Karen initiated the divorce proceeding by an original petition signed by Gillis. No attorney's fees were requested in the original petition. Eventually, Craig and Karen entered into an agreed decree of divorce. Although there is some dispute as to Gillis's role in the negotiations for the agreed divorce decree, the record shows that Gillis appeared with Karen for the hearing and participated in the prove-up of the agreed decree. The decree contains Gillis's initials on the signature line over his name under a heading "Agreed and Approved"; however, the words "form only" appear beside the signature line.
The decree makes no express reference to attorney's fees. It does contain provisions whereby petitioner and respondent are each ordered to pay, "any and all debts, charges, liabilities and other obligations incurred by such respective party from and after April 12, 1983," the date the parties separated. Seven days after the agreed decree was signed by the parties and the trial court, Gillis sent Craig a demand letter for Karen's fees in the divorce action, and Gillis subsequently filed this debt suit against Craig. The trial court in this suit granted summary judgment on the ground of res judicata.
Generally, the doctrine of res judicata applies where there is identity of (1) parties, (2) issues, (3) subject matter, (4) relief sought, and (5) causes of action. Goodier v. Duncan, 651 S.W.2d 25, 27 (Tex.App. Dallas 1983, writ ref'd n.r.e.). In this case, *736 the only questions are (1) whether Gillis was a "party" to the divorce suit, such as would be bound by the divorce decree, and (2) whether the claim for Karen's attorney's fees should have been litigated in the divorce suit.
Gillis contends that he was not a party to the divorce action because he was not named anywhere in the pleadings or the judgment. We do not agree. In divorce cases, Texas courts have held that the parties' attorneys, by their participation in the divorce action, are bound by the divorce decree "as if they had been parties to the suit." Roberts v. Roberts, 144 Tex. 603, 192 S.W.2d 774, 778 (1946); Mullinax, Wells, Mauzy & Collins v. Dawson, 478 S.W.2d 121, 123 (Tex.Civ.App.Dallas 1972, writ ref'd n.r.e.).
In this case, Gillis prepared Karen's pleadings, signed those pleadings, appeared on her behalf at the hearing on the agreed divorce decree, and initialed the divorce decree under the heading, "AGREED AND APPROVED." We hold that these actions constitute sufficient participation in this suit to make Gillis a party as to attorney's fees and barred by the judgment. Mullinax, 478 S.W.2d at 123 (where this Court held that the attorneys were parties "by their participation in the trial, the making of the settlement agreement and the divorce decree").
Having found that the requisite participation exists, we next consider whether the claim for Karen's attorney's fees should have been litigated in the divorce suit and is thus within the scope of the application of the doctrine of res judicata. The scope of res judicata is not limited to matters actually litigated. The judgment in the first suit precludes a second action by the parties and their privies not only on matters actually litigated, but also on causes of action or defenses which arise out of the subject matter and which might have been litigated in the first suit. Texas Water Rights Commission v. Crow Iron Works, 582 S.W.2d 768, 771-72 (Tex.1979). Thus, the rule means only that matters which properly belong to a cause of action asserted in the pending suit, such as will sustain or defeat, in whole or part, that cause of action, must be produced or be barred by the judgment. Gilbert v. Fireside Enterprises, Inc., 611 S.W.2d 869, 872 (Tex.Civ.App.Dallas 1980, no writ); Hudspeth v. Hudspeth, 673 S.W.2d 248, 252 (Tex.App.San Antonio 1984, writ ref'd n.r.e.). The precise question then is whether the issue in Gillis's present action which with the use of diligence might have been, but was not actually, adjudicated in the prior divorce actionconstituted part of the cause of action asserted in the divorce action. This question is answered by a case by case analysis of relevant policy considerations. Gilbert, 611 S.W.2d at 876. The policy considerations are: (1) judicial economy; (2) prevention of vexatious litigation; (3) prevention of double recovery; and (4) promotion of the stability of decisions. Id., at 877.
We hold that the issue of attorney's fees to be recovered by one spouse, in her own behalf or on behalf of her attorney, from the other spouse is an integral part of the divorce action and must be brought in the divorce action. The primary purpose of a divorce suit is to divide the parties' property fairly and equitably. Attorney's fees is but one factor to be considered by the court in making an equitable division of the estate, considering the conditions and needs of the parties and all of the surrounding circumstances. Brown v. Brown, 520 S.W.2d 571, 578 (Tex.Civ.App.Houston [14th Dist.] 1975, no writ). For example, the trial court, in its discretion, may choose not to award attorney's fees to either spouse, even though pleaded for, and adjust the division of property accordingly. The determination of whether to make an award of attorney's fees and, if so, how much is intertwined with all of the equities in the case. The issue of attorney's fees cannot be separated from these other issues. See generally Ogletree v. Crates, 363 S.W.2d 431, 436 (Tex.1963).
*737 It is on this rationale that we base our conclusion that the issue of whether a party should be awarded attorney's fees from the opposing spouse in a divorce action must be raised in the divorce action or else the issue is barred by res judicata. As in this case, to hold otherwise would mean that the court where Gillis filed his debt suit would have to relitigate all of the issues already decided in the divorce suit as to a fair and equitable division of property merely to determine (1) whether Gillis should receive any attorney's fees (derivatively, through his client Karen) and (2) if so, how much. Needless to say, such a holding would not promote judicial economy and would actually encourage vexatious litigation. Additionally, such a holding could also increase the likelihood of a double recovery because the trial court may have varied the property division if it had been required to consider the factor of attorney's feesby awarding one party attorney's fees but less of the overall estate. For these reasons, we conclude that attorney Gillis was required to plead for attorney's fees on behalf of his client against her spouse in the divorce suit or else Gillis was barred from seeking those fees against his client's spouse in a separate suit.[1]
Gillis asserts that the property division in the divorce case would not be disturbed by his recovery in the present action because under the terms of the decree Craig would be entitled to recover from Karen any amount Gillis recovers against him. We do not agree that the principle of res judicata can be avoided in this fashion. To so hold would encourage circuity of action, requiring three suits instead of one to settle the parties' rights. Thus, we affirm the judgment of the trial court and hold that the trial court did not err in granting summary judgment for the reason that Gillis's suit against Craig is barred by the doctrine of res judicata.
NOTES
[1]  Our holding should not be interpreted as limiting in any way an attorney's right to bring a separate suit against his own client for services rendered in a divorce action.
