Page MenuHomePhabricator

No focus after closing window in E16 1.0.24
Closed, ResolvedPublic

Description

With focus follows pointer, closing a focused window does not transfer focus to the window below it. Reverting dd2c51ec75b387757492bd9be57b84c878330ce6 fixes the issue.

focus.mode = 0
focus.clickraises = 0
focus.transientsfollowleader = 1
focus.switchfortransientmap = 1
focus.all_new_windows_get_focus = 0
focus.new_windows_get_focus_if_group_focused = 1
focus.new_transients_get_focus = 0
focus.new_transients_get_focus_if_group_focused = 0
focus.raise_on_next = 0
focus.warp_on_next = 0
focus.warp_always = 0
focus.autoraise.enable = 0
kwo added a subscriber: kwo.Dec 19 2021, 10:28 AM

Hmm.. I cannot reproduce this.
Does it matter which applications the upper and lower are?
How do you close the window?
Please provide the rest of your configuration.

kwo closed this task as Invalid.Feb 2 2022, 8:01 PM

No response - Closing.

auouymous reopened this task as Open.Apr 22 2022, 4:53 AM

Sorry for the delay, I didn't receive an email for your reply. No, the programs do not matter, it happens with firefox and urxvt (a terminal). The upper window is opened with misc.place.manual_mouse_pointer and closed with ^W for firefox and ^D for urxvt. There are cases where it does focus the lower window, but I am unable to reproduce them. This is also an issue with latest git.

backgrounds.hiquality = 1
backgrounds.user = 1
backgrounds.no_scan = 0
backgrounds.timeout = 240
compmgr.enable = 0
compmgr.mode = 1
compmgr.shadows.mode = 0
compmgr.shadows.offset_x = 3
compmgr.shadows.offset_y = 5
compmgr.shadows.blur.radius = 5
compmgr.shadows.blur.opacity = 75
compmgr.shadows.sharp.opacity = 30
compmgr.shadows.color = 0
compmgr.use_name_pixmap = 0
compmgr.use_cow = 1
compmgr.fading.enable = 1
compmgr.fading.time = 200
compmgr.override_redirect.mode = 1
compmgr.override_redirect.opacity = 90
desktops.num = 1
desktops.dragdir = 2
desktops.dragbar_width = 0
desktops.dragbar_length = 0
desktops.dragbar_ordering = 1
desktops.desks_wraparound = 0
desktops.slidein = 0
desktops.slidespeed = 20000
desktops.areas_nx = 7
desktops.areas_ny = 5
desktops.areas_wraparound = 0
desktops.edge_flip_mode = 0
desktops.edge_flip_resistance = 1
effects.ripples.enabled = 0
effects.waves.enabled = 0
focus.mode = 0
focus.clickraises = 0
focus.transientsfollowleader = 1
focus.switchfortransientmap = 1
focus.all_new_windows_get_focus = 0
focus.new_windows_get_focus_if_group_focused = 1
focus.new_transients_get_focus = 0
focus.new_transients_get_focus_if_group_focused = 0
focus.raise_on_next = 0
focus.warp_on_next = 0
focus.warp_always = 0
focus.autoraise.enable = 0
focus.autoraise.delay = 500
glwin.mode = 0
groups.dflt.iconify = 1
groups.dflt.kill = 0
groups.dflt.move = 1
groups.dflt.raise = 0
groups.dflt.set_border = 1
groups.dflt.stick = 1
groups.dflt.shade = 1
iconboxes.anim_time = 250
locale.internal = 
locale.exported = 
menus.animate = 0
menus.onscreen = 1
menus.warp = 1
menus.show_icons = 1
menus.icon_size = 16
menus.key.left = 0xff51
menus.key.right = 0xff53
menus.key.up = 0xff52
menus.key.down = 0xff54
menus.key.escape = 0xff1b
menus.key.ret = 0xff0d
misc.animation.step = 10
misc.buttons.move_resistance = 10
misc.dialogs.headers = 0
misc.dialogs.button_image = 0
misc.dock.enable = 1
misc.dock.sticky = 1
misc.dock.dirmode = 3
misc.dock.startx = 0
misc.dock.starty = 0
misc.hints.set_xroot_info_on_root_window = 0
misc.log.difftime = 0
misc.log.dest = 0
misc.magwin.zoom_res = 4
misc.movres.mode_move = 0
misc.movres.mode_resize = 0
misc.movres.mode_info = 1
misc.movres.mode_maximize_default = 1
misc.movres.color = 0xff0000
misc.movres.avoid_server_grab = 1
misc.movres.update_while_moving = 1
misc.movres.enable_sync_request = 0
misc.movres.dragbar_nocover = 0
misc.movres.enable_smart_max_hv = 0
misc.movres.maximize_animate = 0
misc.movres.maximize_speed = 6000
misc.opacity.menus = 85
misc.opacity.movres = 60
misc.opacity.tooltips = 80
misc.opacity.focused = 100
misc.opacity.unfocused = 100
misc.place.manual = 1
misc.place.manual_mouse_pointer = 1
misc.place.center_if_desk_full = 0
misc.place.ignore_struts = 0
misc.place.ignore_struts_fullscreen = 0
misc.place.ignore_struts_maximize = 0
misc.place.raise_fullscreen = 0
misc.place.slidein = 0
misc.place.cleanupslide = 1
misc.place.slidemode = 0
misc.place.slidespeedmap = 8000
misc.place.slidespeedcleanup = 8000
misc.session.enable_script = 0
misc.session.script = $EROOT/scripts/session.sh
misc.session.enable_logout_dialog = 1
misc.session.enable_reboot_halt = 0
misc.session.cmd_reboot = reboot
misc.session.cmd_halt = poweroff
misc.shading.animate = 1
misc.shading.speed = 8000
misc.snap.enable = 1
misc.snap.edge_snap_dist = 8
misc.snap.screen_snap_dist = 32
misc.startup.firsttime = 0
misc.startup.animate = 0
misc.testing.argb_internal_objects = 0
misc.testing.argb_internal_clients = 0
misc.testing.argb_clients = 0
misc.testing.argb_clients_inherit_attr = 0
misc.testing.image_cache_size = -1
misc.testing.ximage_cache_count = -1
misc.testing.mask_alpha_threshold = 8
misc.testing.enable_startup_id = 1
misc.testing.use_render_for_scaling = 0
misc.testing.bindings_reload = 1
misc.testing.no_sync_mask = 0
misc.autosave = 1
misc.memory_paranoia = 1
misc.save_under = 1
pagers.enable = 0
pagers.zoom = 1
pagers.title = 1
pagers.hiq = 1
pagers.mode = 1
pagers.scanspeed = 10
pagers.sel_button = 2
pagers.win_button = 1
pagers.menu_button = 3
tooltips.enable = 0
tooltips.showroottooltip = 0
tooltips.delay = 1500
warplist.enable = 0
warplist.showsticky = 0
warplist.showshaded = 1
warplist.showiconified = 0
warplist.showalldesks = 0
warplist.warpfocused = 1
warplist.raise_on_select = 1
warplist.warp_on_select = 0
warplist.show_shape = 0
warplist.icon_mode = 0
kwo added a comment.Apr 27 2022, 9:10 PM

Sorry, I simply cannot reproduce this with 1.0.24 or current git at all.

I was also able to reproduce this on current git and a new config after only enabling focus follows pointer.

The windows do receive keyboard input, their titlebar and border just doesn't change color to indicate it is focused. xterm's cursor usually always changes to indicate focus even if its border doesn't. urxvt's cursor only indicates focus when the border changes. It is also harder to get xterm to not focus the window below, but once it happens, it usually keeps happening. urxvt almost always doesn't focus the window below it.

I don't know if it helps, but FocusSet() is only called once by _FocusIdler() when the top window is closed and the lower window doesn't get focused. Reverting the mentioned commit always calls it a second time to focus the lower window.

kwo added a comment.Fri, Apr 29, 3:31 AM

I still cannot reproduce this.
Reverting commit dd2c51ec effectively just disables the request serial number check (until the serial number becomes large, and then focusing will stop) in FocusHandleEnter() which causes other problems (although I cannot remember exactly which).
Does disabling the serial number check fix your problem (without reverting dd2c51ec)?
Could it be an X-server related issue? Which version are you using?
Could it be an e16 build thing? You seem to have a non-default build, e.g. GLX enabled, so what are your build options?
Could it be a theme thing? Does this happen with the winter theme?
Could you try running (an unmodified e16 from git) with environment variable EDEBUG=1:129 (or do "eesh debug events 1:129" when running) and log stdout during a session where the problem occurs?
Do I understand correctly that you see the problem just by having xterm's and/or urvxt's stacked on top of each other and closing them with Ctrl-D?

kwo added a comment.Fri, Apr 29, 4:08 AM

... the debug setting should be 1:7:8:129 to include enter/leave events.

It appears to be --disable-container that causes the problem.

[2490]   14.637278: FocusToEWin(0) 0x180000a bob@borg: ~ why=EWIN_UNMAP
[2490]   14.639109: *** ERROR: xid=0x180000a req=18/0 err=3: X_ChangeProperty: BadWindow (invalid Window parameter)
[2490]   14.639129: *** ERROR: xid=0x180000a req=15/0 err=3: X_QueryTree: BadWindow (invalid Window parameter)
[2490]   14.639147: 0x002c02  EV-EnterNotify ev=0x100038f sub=0 x,y=212,130 m=NotifyNormal d=NotifyInferior ss=1 focus=1
[2490]   14.639154: FocusToEWin(0) 0 None why=NONE
[2490]   14.639158: doFocusToEwin: 0 None why=NONE
[2490]   14.640101: 0x002c03  EV-LeaveNotify ev=0x100038f sub=0 x,y=212,130 m=NotifyNormal d=NotifyNonlinear ss=1 focus=1
[2490]   14.640112: 0x002c03  EV-EnterNotify ev=0x100018e sub=0x160000a x,y=244,180 m=NotifyNormal d=NotifyNonlinearVirtual ss=1 focus=1
[2490]   14.640117: FocusHandleEnter: Ignore serial < 0x2c27

xorg 1.20.14 with winter theme.

Do I understand correctly that you see the problem just by having xterm's and/or urvxt's stacked on top of each other and closing them with Ctrl-D?

Yes.

Does disabling the serial number check fix your problem (without reverting dd2c51ec)?

How do I disable that?

kwo added a comment.Sun, May 8, 7:30 AM

Ok, the --disable-container is in the "DO NOT USE" department and I am aware of other bugs with that setting. It's really just an experimental thing for me to play with.
Likewise with many of the other "DO NOT USE" options. If it doesn't cause you trouble then fine, otherwise bad luck, don't use it.
And --disable-container is particularly non-useful for users in general (and particularly likely to cause focus problems).

Disabling the serial number check would be commenting it out :)
But never mind now, just don't disable container window!

--enable-container      use container window (experimental) [default=yes]

That looks like container is experimental and the Gentoo ebuild author apparently felt the same way and requires the user to explicitly enable it.

- - container  : Use container window (experimental)

Are the other experimental options the "DO NOT USE" in their non-default states? They are all off by default, except for container. Could --enable-container be changed to --disable-container in configure --help so users and package maintainers better understand which state is experimental?

kwo added a comment.Mon, May 9, 6:56 AM

Yeah, I agree that it was somewhat ambiguous.
I have changed the option to --enable-no-container, off by default.
So now all "experimental" options are off by default and must be --enabled to become active.
Hope that's better.

auouymous closed this task as Resolved.Mon, May 9, 7:05 PM
auouymous claimed this task.

Thank you for your help on this.