-
Notifications
You must be signed in to change notification settings - Fork 502
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
-i (inactive_opacity) does not work on windows just mapped & focused #39
Comments
More info in the issue description. This also fixes the problem for --inactive-dim.
So, just to make sure I'm understanding... A window gets mapped, compton calls XSelectInput, but the XSelectInput actually completes after the FocusIn event for the window is fired? That is tricky. This seems kind of messy though. It'd be really nice to find a cleaner way. Maybe we should put this fix on hold. By the way, I do really like the idea of a |
Yeah, that's what I suspect. X maps a window then immediately emits a The code looks somehow messy, indeed. Hmm, if there's indeed a cleaner fix... I don't even know where I should ask a question about Xlib? A mailing list? By the way, I'm using a similar messy piece of code to determine the currently focused window on startup in the opacity bug fix, the sole difference is it utilizes an array of the children of the root window just returned above for better performance. I did another commit, stopping compton from tracking focus changes if neither
:-) I'm actually thinking about applying binomial / gaussian blur to inactive windows, yet it's probably not practically very useful, and much harder to perfectly implement. What are the functionalities you are thinking about, if you don't mind me asking? |
Hehe, not sure. I never had strong Xlib knowledge before this project either. All the knowledge I have came from me staring at the original xcompmgr code and reading whatever documentation and/or old mailing list posts I could find on xlib/xrender.
That's just me being vague. Before, for code in |
Huh, sorry, I never realized compton actually maintains a field called An issue is
I never touched Xlib, nor have I written anything serious with C under Linux, before 6 days ago when I started debugging the fvwm window stacking issue. :-) Documentation about Xlib looks extraordinarily rare, xlib manual on Christophe Tronche's website and the |
Yeah, agreed. @richardgv, I've merged all of your changes up until and changed a few things to keep with the overall coding style. It proved to be very difficult to cherry-pick individual fixes, so everything is going in master now. It'd be nice of you to grab the last commits from master so our branches don't diverge too much. |
Oh, and a new problem. Not with the inactive opacity changes, but with Awesome. Window managers that don't follow EWMH and don't set the window type properly are going to have a hard time with inactive transparency now. Before, since compton only lessened a window's transparency when it at least had been focused once, window managers like this had no problem. Now, the wibox/panel and menu in Awesome are showing up inactively transparent for me. Compton sees them as normal windows. In other words, the original misbehavior of compton actually helped with WM's that don't set Anyway, @richardgv, thanks for all your hard work. These are all great improvements. |
Menus of fvwm itself has the same issue. Oh, the things we could do are rather limited about the situation. I imagine there are a few choices:
Did it. |
From just experimenting with this in Awesome, I honestly think this might be the best route. Detect |
See chjj's comments on issue #39: #39 (comment) - Add a switch --mark-wmwin-focused that try to detect WM windows and mark them active. - Fix a bug that causes BadDrawable, etc. if a window is mapped then immediately unmapped. - Fix a bug in determine_evmask(). - Add a debug option DEBUG_CLIENTWIN. - Force window repaint on window frame extent change. - Code cleanup.
Implemented. (Do you have another implementation?) Use |
Yes, instead of always focusing the non-client-containing windows, I simply changed the edit: Using the method above, it might be wise to only fallback to checking for |
Yeah, that's more intuitive. My approach is to mark a window as active initially if it has no client window in |
See chjj's comments on issue #39: chjj/compton#39 (comment) - Add a switch --mark-wmwin-focused that try to detect WM windows and mark them active. - Fix a bug that causes BadDrawable, etc. if a window is mapped then immediately unmapped. - Fix a bug in determine_evmask(). - Add a debug option DEBUG_CLIENTWIN. - Force window repaint on window frame extent change. - Code cleanup.
This is a pretty simple problem. I created an issue for it just because my fix is ugly and possibly slow and I wonder if you guys have a better way.
The problem:
If a window gets mapped and instantly gets focus, compton will not notice it. When using
-i
(inactive_opacity
), the window will be rendered as inactive. To reproduce it, start compton with-i
, minimize a full screen window, then restore it.The fix:
My fix will be committed to
richardgv-dev
branch soon. A description of the my guess about the cause is included in comments:The problem of the fix:
I guess it would be slow. Querying X server for many times is not the fastest thing in the world.
The text was updated successfully, but these errors were encountered: