-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
if monitor name happens to get updated in ParseOptions, the rest of FvwmPager config is skipped #146
Conversation
…onfig file is skipped.
Hi @d-e-e-p, If you wanted to incorporate that suggestion, please do. This would mean using this function in two places:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @d-e-e-p,
Excellent. Thanks for this. Functionally this all looks good. Just some minor style nits inline, with a couple of suggestions you can approve as you're reading.
modules/FvwmPager/FvwmPager.c
Outdated
@@ -1467,6 +1467,28 @@ void list_end(void) | |||
XFree((char *)children); | |||
} | |||
|
|||
void extract_monitor_config(struct fpmonitor *m, char *tline) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void extract_monitor_config(struct fpmonitor *m, char *tline) { | |
void extract_monitor_config(struct fpmonitor *m, char *tline) | |
{ |
modules/FvwmPager/FvwmPager.c
Outdated
m2->virtual_scr.Vy = vy; | ||
m2->virtual_scr.VxMax = vxmax; | ||
m2->virtual_scr.VyMax = vymax; | ||
extract_monitor_config(m2,tline); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indenting here looks odd.
modules/FvwmPager/FvwmPager.c
Outdated
m->virtual_scr.Vy = vy; | ||
m->virtual_scr.VxMax = vxmax; | ||
m->virtual_scr.VyMax = vymax; | ||
extract_monitor_config(m,tline); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here -- indentation looks odd. Also:
extract_monitor_config(m,tline); | |
extract_monitor_config(m, tline); |
modules/FvwmPager/FvwmPager.c
Outdated
TAILQ_INSERT_TAIL(&fp_monitor_q, m, entry); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No blank line necessary here:
modules/FvwmPager/FvwmPager.c
Outdated
m2->virtual_scr.Vy = vy; | ||
m2->virtual_scr.VxMax = vxmax; | ||
m2->virtual_scr.VyMax = vymax; | ||
extract_monitor_config(m2,next); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, indentation seems off. Also:
extract_monitor_config(m2,next); | |
extract_monitor_config(m2, next); |
modules/FvwmPager/FvwmPager.c
Outdated
m->virtual_scr.Vy = vy; | ||
m->virtual_scr.VxMax = vxmax; | ||
m->virtual_scr.VyMax = vymax; | ||
extract_monitor_config(m,next); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation.
modules/FvwmPager/FvwmPager.h
Outdated
@@ -169,6 +169,7 @@ RETSIGTYPE DeadPipe(int nonsense); | |||
void process_message(FvwmPacket*); | |||
void ParseOptions(void); | |||
|
|||
void extract_monitor_config(struct fpmonitor *m, char *tline); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's a mess of styles, but for new additions:
- Scoped functions should be declared as
static
; - Function prototypes can be unnamed with respect to the variables used.
Hence:
void extract_monitor_config(struct fpmonitor *m, char *tline); | |
static void extract_monitor_config(struct fpmonitor *, char *); |
Co-authored-by: Thomas Adam <[email protected]>
check in with changes..thanks for walking me thru all of them. |
Hi @d-e-e-p, OK. Thanks! Please can you squash the last two commits together and push the changes here? Thanks, |
…onfig file is skipped. also added helper function extract_monitor_config to extract monitor params from string
might be useful to have a helper function update monitor params from string, eg: