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

Normal windows get faded on exit with no-fading-openclose = true #245

Open
blueyed opened this issue Nov 12, 2014 · 3 comments
Open

Normal windows get faded on exit with no-fading-openclose = true #245

blueyed opened this issue Nov 12, 2014 · 3 comments

Comments

@blueyed
Copy link

blueyed commented Nov 12, 2014

I am trying to figure out if the combination of --fading and --no-fading-openclose is working as expected.

There is no fading when opening a window, but when closing it!

Relevant settings:

# Fading
fading = true;
# fade-delta = 30;
fade-in-step = 0.03;
fade-out-step = 0.03;
no-fading-openclose = true;
# no-fading-destroyed-argb = true;
fade-exclude = [ ];

wintypes:
{
  # Also used for completion in KMyMoney.
  tooltip = { fade = true; shadow = true; opacity = 0.85; focus = true; };
  notify = { fade = true; shadow = true; opacity = 0.95; focus = true; };
  normal = { fade = true; };
};

When setting fade=false via wintypes fading gets not done during closing, but it seems like no-fading-openclose should cover this anyway?!

wintypes:
{
  …
  normal = { fade = false; };
};

Debug output when the window gets opened:

set_fade_callback(0x04200010): exec callback
set_fade_callback(0x04200009): exec callback
[     3.63 ] error    3 BadWindow    request    2 minor    0 serial   4780: "BadWindow (invalid Window parameter)"
win_determine_fade(0x01c002dd): via wintype_fade[normal]
win_determine_fade(0x01c002dd): fade = 1
win_get_name(0x01c002dd): client = 0x04200009, name = "urxvt", ret = 1
win_get_class(0x01c002dd): client = 0x04200009, instance = "urxvt", general = "URxvt"
win_get_role(0x01c002dd): client = 0x04200009, role = "(null)", ret = -1
map_win(0x01c002dd): type normal
win_determine_fade(): no_fading_openclose and in_openclose
win_determine_fade(0x01c002dd): fade = 0
set_fade_callback(0x01c002dd): exec callback
finish_map_win(0x01c002dd)
win_determine_fade(0x01c002dd): via wintype_fade[normal]
win_determine_fade(0x01c002dd): fade = 1
finish_map_win(0x01c002dd): end
win_get_name(0x01c002dd): client = 0x04200009, name = "~/src/awesome_ (awesome)", ret = 1
win_get_name(0x01c002dd): client = 0x04200009, name = "~/src/awesome_ (awesome)", ret = 0

And when the window gets closed:

set_fade_callback(0x02400155): exec callback
set_fade_callback(0x04200011): exec callback
win_determine_fade(): no_fading_openclose and in_openclose
win_determine_fade(0x01c002dd): fade = 0
set_fade_callback(0x01c002dd): exec callback

I've added various debug statements, and will provide them in a pull request (#246).

Additionally: when minimizing the window it gets faded (which is expected), but on unminimizing it won't.

I am using the awesome window manager. Both awesome and compton from Git master.

blueyed added a commit to blueyed/compton that referenced this issue Nov 12, 2014
This adds printf_dbgf statements to debug issues with fading.

Ref: chjj#245
@blueyed
Copy link
Author

blueyed commented Nov 12, 2014

I have bisected this to b7b043c.

/ping @richardgv

@blueyed
Copy link
Author

blueyed commented Nov 12, 2014

This fixes it, but the fading is also not applied to (un)minimizing (where unminimizing does not work despite of this patch):

diff --git i/src/compton.c w/src/compton.c
index aec56ca..f76f96e 100644
--- i/src/compton.c
+++ w/src/compton.c
@@ -2416,8 +2416,11 @@ static void
 win_determine_fade(session_t *ps, win *w) {
   if (UNSET != w->fade_force)
     w->fade = w->fade_force;
-  else if (ps->o.no_fading_openclose && w->in_openclose)
+  else if (ps->o.no_fading_openclose && w->in_openclose) {
     w->fade = false;
+    // Prevent it from being overwritten by last-paint value
+    w->fade_last = false;
+  }
   else if (ps->o.no_fading_destroyed_argb && w->destroyed
       && WMODE_ARGB == w->mode && w->client_win && w->client_win != w->id) {
     w->fade = false;

@richardgv
Copy link
Collaborator

Thanks for the report and patch, and sorry for the late reply.

Unfortunately I didn't read your report in time... And implemented the fix as 65e655e (in richardgv-dev branch) instead after discovered it a few hours ago.

but the fading is also not applied to (un)minimizing (where unminimizing does not work despite of this patch):

Yes, it affects (de)iconify as well, and that's the intended behavior. I will clarify the description later.

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 a pull request may close this issue.

2 participants