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

Redraw border when minimizing and restoring window #49

Closed
wants to merge 1 commit into from

Conversation

f1u77y
Copy link
Contributor

@f1u77y f1u77y commented Apr 6, 2016

Border color isn't set corretly with modify.

@geekosaur
Copy link
Contributor

I'd imagine the original was intended to be used with sendMessage, which causes a refresh afterward; that should force the window border to be correct. since windows would then recolor all visible window borders. (And conversely, using windows here means a double update which could be slow with many windows.)

That said, this whole area is fairly complex. It is worth testing this fairly well, and possibly reviewing the sources of the messages to verify that they aren't doing things like sending without refresh (or if they are, finding out why they are because it may mean potential lurking issues).

@f1u77y
Copy link
Contributor Author

f1u77y commented Apr 6, 2016

windows would then recolor all visible window border

As I can understand, windows f recolors only window borders whose focus have been changed by f. So, modifying windowset by modify and not by windows leads to such a bug(#46).

(And conversely, using windows here means a double update which could be slow with many windows.)

I know that's bad, but restoring window needs to call windows. Anyway, restoring windows, I think, should not be called only by a message, because any modifying windowset from the internal layout functions AFAIK is bad. So, any solution that uses layout hooks for minimizing should run windows twice.

@geekosaur
Copy link
Contributor

"any modifying windowset from the internal layout functions AFAIK is bad"

That's kinda the point; this is effectively an internal layout function, so I'm wary.

@f1u77y
Copy link
Contributor Author

f1u77y commented Apr 6, 2016

Ok, then now I see 2 ways to fix the bug:

  1. Make restoreNextMinimizedWindow a function and call windows and other X stuff from it after sendMessage. That is more safe but still runs windows twice.
  2. Rewrite X.L.Minimize without any layout hooks.

@f1u77y f1u77y changed the title Use windows instead of modify in X.L.Minimize Redraw border when minimizing and restoring window May 2, 2016
When we modify window set with `modify`, borders are not redrawn. Now we
use light version of `windows` that doesn't run any hooks and redraws
the border.
Closes xmonad#46.
@f1u77y
Copy link
Contributor Author

f1u77y commented Oct 25, 2016

Closing that PR giving preference to #102

@f1u77y f1u77y closed this Oct 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants