-
-
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
Improve monitor event handling #1069
Conversation
Thanks, @farblos There's a few changes here I don't think we need, plus many changes we can consolidate. We don't need any of the documentation changes you've made. I'll reply more fully in the coming days. The needs a lot more refinement yet. |
Sure, thanks. If you think it'll help we can discuss this also via IRC. Only we need to arrange some kind of a meeting then, since I'm usually not available on IRC. |
Thanks, @farblos -- I'm always in #fvwm on IRC, so if you're not always around, catch me when you can... :) |
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 @farblos
Thanks for this.
Overall it looks good to me. I've left specific comments in this review.
Key things here to note are:
- I'd like you to remove the comments you've added before each function in libs/FScreen.c -- presumably it's there to help you, but doesn't belong in this commit.
- We don't need MONITORS.md so that can go.
- We need to think more carefully about FvwmEvent, and what we want to pass to it. That said, I don't want us to introduce a
PassArgs
component to FvwmEvent as you're suggesting. I suspect it will be enough to just send m->si->name to either RandRFunc, for the specific event in FvwmEvent.
If you could make the required changes, this should help reduce some of the extraneous noise in this change.
Any questions, please let me know.
Thanks for your review! That's much more detailed than I expected - and it will take some time for me to address them, here and on IRC... |
97118b1
to
b335a19
Compare
Since we settled on Regardless of that I might (or not) take another stab at the man page in a separate PR. I think it could state more clearly and at the beginning how exactly the command is built. For example, I took me reading the sources to understand that I can leave |
Hi @ThomasAdam, I think I'm through with the changes from your review, removing most of the noise. Plus I reverted all changes related to
I removed the "draft" flag from the PR, but I'm not sure how to close the open review status ... Anyway, we can continue from here as you prefer:
Just pls let me know how to continue, and preferredly in this PR, since I won't hang around in IRC the next days. Thanks! |
Thanks. Please have a look at commit 652eb34 on branch I've squashed all of your intermediary commits into just one commit for these changes (even though these changes cross fvwm <-> module boundaries, it's all related). I've left the authorship intact, but changed the commit message. You'll note in I've left a commented block with In order to see what I've changed, relative to this PR, you can do:
Which assumes your branch for this PR is called What I suggest you do is cherry-pick 652eb34 onto your branch, make any changes to that commit, and just force-push it to this PR. Hope that helps. Any questions let me know. |
Fair enough, thanks. Regarding your FIXME in TAILQ_FOREACH(mo, &monitorsold_q, oentry) {
if (strcmp(m->si->name, mo->si->name) != 0)
continue;
if (mo->Desktops == NULL)
continue;
for (t = Scr.FvwmRoot.next; t; t = t->next) {
if (t->m == mo) {
t->m = m;
update_fvwm_monitor(t);
}
}
m->emit |= MONITOR_CHANGED;
} Since you have let me remove the But that is done identically also at the very bottom of function for (t = Scr.FvwmRoot.next; t; t = t->next) {
update_fvwm_monitor(t);
} Wouldn't that suffice? |
Hi @farblos Yes. This should suffice. |
Move the state logic of when to emit events into scan_screens() and update the event logic accordingly so that RandRFunc is run correctly.
234b30c
to
b373a30
Compare
Hi @ThomasAdam, this is it. Hopefully. My changes + your cleanup + your commit message - fixme, squashed and rebased onto main. Should be identical to So if you also think that this is it, feel free to merge. Thanks a lot! P.S. I have tried to reach you on IRC wrt. some follow-up issues, will try to pester you later with these... |
What does this PR do?
After the monitor event handling changes earlier this year I noticed that I do not get any longer
monitor_changed
events. I started checking the relevant code and found some issues, then some more, and then I went down the rabbit hole ...Know I have Fvwm in a state where I get
montor_changed
,_disabled
,_enabled
events exactly mirroring the xrandr changes.Here is a rough overview of what I did:
monitorsold_q
, since I decided that it is a left-over of an earlier event implementationm->emit
inmonitor_emit_broadcast
, plus I removed abreak
statement that would (IMO) exit the loop even if there are still events that need reporting (also some left-over?)dispatch_event
to avoid double handling of identical events (even thoughscan_monitors
should now handle these well)scan_monitors
to more accurately detect changes in monitor configuration also in all sorts of edge casesKnown Open Issues and Questions
m->emit
. Not sure how relevant that is, though.Edits