Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FvwmPager: Use ULONG_MAX to identify a non configured Pixel. #1106

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/FvwmPager/init_pager.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ void initialize_desks_and_monitors(void)
default_style->bg = GetSimpleColor("white");
default_style->hi_fg = GetSimpleColor("black");
default_style->hi_bg = GetSimpleColor("grey");
default_style->win_fg = None; /* Use fvwm pixel unless defined. */
default_style->win_fg = ULONG_MAX; /* Use fvwm pixel unless defined. */
default_style->win_bg = None;
default_style->focus_fg = None;
default_style->focus_fg = ULONG_MAX;
default_style->focus_bg = None;
default_style->balloon_fg = None;
default_style->balloon_bg = None;
Expand Down
2 changes: 1 addition & 1 deletion modules/FvwmPager/x_pager.c
Original file line number Diff line number Diff line change
Expand Up @@ -2055,7 +2055,7 @@ void setup_balloon_window(PagerWindow *t)
Balloon.cs = style->balloon_cs;

fg = (style->balloon_fg) ? style->balloon_fg :
(style->win_fg) ? style->win_fg : t->text;
(style->win_fg < ULONG_MAX) ? style->win_fg : t->text;
XSetForeground(dpy, Balloon.gc, fg);

XUnmapWindow(dpy, Scr.balloon_w);
Expand Down
8 changes: 4 additions & 4 deletions modules/FvwmPager/x_update.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,10 @@ void do_label_window(PagerWindow *t, Window w, rectangle r)
DeskStyle *style = FindDeskStyle(t->desk);

if (t == FocusWin) {
pix = (style->focus_fg) ? style->focus_fg : Scr.focus_win_fg;
pix = (style->focus_fg < ULONG_MAX) ? style->focus_fg : Scr.focus_win_fg;
cs = style->focus_cs;
} else {
pix = (style->win_fg) ? style->win_fg : t->text;
pix = (style->win_fg < ULONG_MAX) ? style->win_fg : t->text;
cs = style->win_cs;
}
XSetForeground(dpy, Scr.NormalGC, pix);
Expand Down Expand Up @@ -453,7 +453,7 @@ void do_border_window(PagerWindow *t, Window w, rectangle r)
}

if (t == FocusWin) {
if (style->focus_fg)
if (style->focus_fg < ULONG_MAX)
XSetForeground(dpy,
style->focus_hi_gc, style->focus_fg);
else
Expand All @@ -464,7 +464,7 @@ void do_border_window(PagerWindow *t, Window w, rectangle r)
style->focus_hi_gc, style->focus_hi_gc,
WindowBorderWidth);
} else {
if (style->win_fg)
if (style->win_fg < ULONG_MAX)
XSetForeground(dpy,
style->win_hi_gc, style->win_fg);
else
Expand Down
Loading