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

Pop ups make the client uncontrollable. #129

Closed
Aleod-m opened this issue Feb 2, 2021 · 13 comments
Closed

Pop ups make the client uncontrollable. #129

Aleod-m opened this issue Feb 2, 2021 · 13 comments
Labels
bug Something isn't working

Comments

@Aleod-m
Copy link

Aleod-m commented Feb 2, 2021

Hi. Before reading this note that i'm a really new user of penrose. I might have done something wrong.

I discovered something really annoying in penrose. I was using Firefox as my browser. I closed the window but the pop up warning for multiple tabs appeared then i mistakenly switched the focus to another client thinking Firefox was closed. Then when the focus came back to the Firefox i couldn't close it or move it. The red outline was also outlining all the screen.

Steps to reproduce the behavior:

  1. open firefox
  2. open a bunch of tabs
  3. close the window
  4. switch focus
  5. come back to the firefox window

Versions & OS Details

  • OS: Linux
  • Arch
  • Penrose Version 0.2.0

Here is my current Main.rs

#[macro_use]
extern crate penrose;

use penrose::{
    core::{
        bindings::KeyEventHandler,
        config::Config,
        helpers::index_selectors,
        manager::WindowManager,
    },
    logging_error_handler,
    xcb::new_xcb_backed_window_manager,
    Backward, Forward, Less, More, Selector,
};

use simplelog::{LevelFilter, SimpleLogger};


// Replace these with your preferred terminal and program launcher
const TERMINAL: &str = "alacritty";
const LAUNCHER: &str = "dmenu_run";


fn main() -> penrose::Result<()> {
    // Initialise the logger (use LevelFilter::Debug to enable debug logging)
    if let Err(e) = SimpleLogger::init(LevelFilter::Info, simplelog::Config::default()) {
        panic!("unable to set log level: {}", e);
    };

    let config = Config::default();
    let key_bindings = gen_keybindings! {
        // Program launchers
        "M-n" => run_external!(LAUNCHER);
        "M-t" => run_external!(TERMINAL);

        // Exit Penrose (important to remember this one!)
        "M-Escape" => run_internal!(exit);

        // client management
        "M-j" => run_internal!(cycle_client, Forward);
        "M-k" => run_internal!(cycle_client, Backward);
        "M-S-j" => run_internal!(drag_client, Forward);
        "M-S-k" => run_internal!(drag_client, Backward);
        "M-f" => run_internal!(toggle_client_fullscreen, &Selector::Focused);
        "M-q" => run_internal!(kill_client);

        // workspace management
        "M-w" => run_internal!(toggle_workspace);
        "M-Tab" => run_internal!(cycle_workspace, Forward);
        "M-S-Tab" => run_internal!(cycle_workspace, Backward);

        // Layout management
        "M-l" => run_internal!(cycle_layout, Forward);
        "M-S-l" => run_internal!(cycle_layout, Backward);
        "M-A-Up" => run_internal!(update_max_main, More);
        "M-A-Down" => run_internal!(update_max_main, Less);
        "M-A-Right" => run_internal!(update_main_ratio, More);
        "M-A-Left" => run_internal!(update_main_ratio, Less);

        refmap [ config.ws_range() ] in {
            "M-{}" => focus_workspace [ index_selectors(config.workspaces().len()) ];
            "M-S-{}" => client_to_workspace [ index_selectors(config.workspaces().len()) ];
        };
    };

    let mut wm = new_xcb_backed_window_manager(config, vec![], logging_error_handler())?;
    wm.grab_keys_and_run(key_bindings, map!{})
} 

And here is my log file:

21:09:22 [INFO] Detected Screen: Screen { wix: 0, true_region: Region { x: 0, y: 0, w: 1920, h: 1080 }, effective_region: Region { x: 0, y: 18, w: 1920, h: 1062 } }
21:09:22 [INFO] Detected Screen: Screen { wix: 1, true_region: Region { x: 1920, y: 0, w: 1920, h: 1080 }, effective_region: Region { x: 1920, y: 18, w: 1920, h: 1062 } }
21:09:22 [INFO] Updating known screens: 2 screens detected
21:09:22 [WARN] attempt to remove unknown client 8388609
21:09:22 [WARN] attempt to remove unknown client 10485761
21:09:22 [WARN] attempt to remove unknown client 6291457
21:12:11 [WARN] attempt to remove unknown client 6291459
21:12:16 [WARN] attempt to remove unknown client 18874371
21:12:17 [WARN] attempt to remove unknown client 18874370
21:29:29 [WARN] attempt to remove unknown client 20971637
21:29:30 [WARN] attempt to remove unknown client 20971652
01:09:32 [WARN] attempt to remove unknown client 41943040
@Aleod-m Aleod-m added the bug Something isn't working label Feb 2, 2021
@Aleod-m Aleod-m changed the title Pop ups make the client uncontrallable. Pop ups make the client uncontrollable. Feb 2, 2021
@sminez
Copy link
Owner

sminez commented Feb 2, 2021

@AdrienDML are you able to reproduce this with debug logging enabled? I use firefox as my browser and I've never seen this issue if I'm honest 😕 That said, I'm not sure I know what you mean by "the pop up warning for multiple tabs". Some screenshots of what this looks like when it happens would really help!

I'm working on some known issues raised by @psychon around penrose not following ICCCM correctly (for sub windows in particular) which it feels like this might be another aspect of.

@Aleod-m
Copy link
Author

Aleod-m commented Feb 3, 2021

I will try to do that :) It's the pop up that warn you that you are going to close multiple tabs. One fix is to disable the pop up.

@sminez
Copy link
Owner

sminez commented Feb 3, 2021

Could you run xprop on that window and share the output? I suspect I know what this is now but that would help me confirm 😄

@glyphpoch
Copy link

Hello, I think I'm running into the same issue, the pop-up would normally be disabled but ran into it on a fresh Ubuntu installation.

OS & version:
Ubuntu 20.04
penrose 0.2

xprop output:

_NET_ACTIVE_WINDOW(WINDOW): window id # 0xc00081
_NET_WM_DESKTOP(CARDINAL) = 2
_NET_WM_STATE(ATOM) = _NET_WM_STATE_MODAL
WM_HINTS(WM_HINTS):
		Client accepts input or input focus: True
		Initial state is Normal State.
		bitmap id # to use for icon: 0xc00085
		bitmap id # of mask for icon: 0xc0008b
		window id # of group leader: 0xc00001
_GTK_THEME_VARIANT(UTF8_STRING) = 
WM_WINDOW_ROLE(STRING) = "Dialog"
_NET_WM_BYPASS_COMPOSITOR(CARDINAL) = 2
XdndAware(ATOM) = BITMAP
_NET_WM_ICON(CARDINAL) = 	Icon (16 x 16):

# A bunch of ASCII Firefox icons here

_NET_WM_OPAQUE_REGION(CARDINAL) = 
WM_TRANSIENT_FOR(WINDOW): window id # 0xc00003
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DIALOG
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 12583043, 12583044
_NET_WM_USER_TIME(CARDINAL) = 16559383
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0xc00082
WM_CLIENT_LEADER(WINDOW): window id # 0xc00001
_NET_WM_PID(CARDINAL) = 4099
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLIENT_MACHINE(STRING) = "ubuntu"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		program specified location: 0, 0
		program specified minimum size: 387 by 132
		program specified maximum size: 16384 by 16384
		program specified base size: 387 by 132
		window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = "Firefox", "Firefox"
WM_ICON_NAME(STRING) = "Quit and close tabs?"
_NET_WM_ICON_NAME(UTF8_STRING) = "Quit and close tabs?"
WM_NAME(STRING) = "Quit and close tabs?"
_NET_WM_NAME(UTF8_STRING) = "Quit and close tabs?"

Logs (search for "Quit"):

16:01:05 [DEBUG] (1) penrose::core::workspace: applying '[side]' layout for 1 clients on workspace '3'
16:01:05 [DEBUG] (1) penrose::core::manager::util: configuring 12582915 with Some(Region { x: 0, y: 24, w: 1920, h: 919 })
16:01:05 [DEBUG] (1) penrose::core::manager: Running layout_applied hooks
16:01:05 [DEBUG] (1) penrose::core::manager: Running focus_change hooks
16:01:05 [DEBUG] (1) penrose::core::manager: Running workspace_change hooks
16:01:05 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:06 [DEBUG] (1) penrose::core::manager: Got XEvent: Leave { id: 4194318, rpt: Point { x: 1385, y: 584 }, wpt: Point { x: 211, y: 538 } }
16:01:06 [DEBUG] (1) penrose::core::manager: Handling event action: ClientFocusLost(4194318)
16:01:06 [DEBUG] (1) penrose::core::manager: Handling event action: SetScreenFromPoint(Some(Point { x: 1385, y: 584 }))
16:01:06 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:06 [DEBUG] (1) penrose::core::manager: Got XEvent: ConfigureNotify { id: 12582915, r: Region { x: 20, y: 44, w: 1876, h: 875 }, is_root: false }
16:01:06 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:06 [DEBUG] (1) penrose::core::manager: Got XEvent: ConfigureNotify { id: 12582915, r: Region { x: 20, y: 44, w: 1876, h: 875 }, is_root: false }
16:01:06 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:06 [DEBUG] (1) penrose::core::manager: Got XEvent: Enter { id: 12582915, rpt: Point { x: 1385, y: 584 }, wpt: Point { x: 1363, y: 538 } }
16:01:06 [DEBUG] (1) penrose::core::manager: Handling event action: ClientFocusGained(12582915)
16:01:06 [DEBUG] (1) penrose::core::manager: Running focus_change hooks
16:01:06 [DEBUG] (1) penrose::core::manager: Handling event action: SetScreenFromPoint(Some(Point { x: 1385, y: 584 }))
16:01:06 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:06 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12582915, atom: "_NET_ACTIVE_WINDOW", is_root: false }
16:01:06 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12582915, "_NET_ACTIVE_WINDOW", false)
16:01:06 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:06 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12582915, atom: "_NET_ACTIVE_WINDOW", is_root: false }
16:01:06 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12582915, "_NET_ACTIVE_WINDOW", false)
16:01:06 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:06 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12582915, atom: "_NET_WM_OPAQUE_REGION", is_root: false }
16:01:06 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12582915, "_NET_WM_OPAQUE_REGION", false)
16:01:06 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:06 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12582915, atom: "_NET_WM_OPAQUE_REGION", is_root: false }
16:01:06 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12582915, "_NET_WM_OPAQUE_REGION", false)
16:01:06 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:06 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12582915, atom: "WM_HINTS", is_root: false }
16:01:06 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12582915, "WM_HINTS", false)
16:01:06 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:06 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12582915, atom: "_NET_WM_OPAQUE_REGION", is_root: false }
16:01:06 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12582915, "_NET_WM_OPAQUE_REGION", false)
16:01:06 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:06 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12582915, atom: "_NET_WM_OPAQUE_REGION", is_root: false }
16:01:06 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12582915, "_NET_WM_OPAQUE_REGION", false)
16:01:06 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:06 [DEBUG] (1) penrose::core::manager: Got XEvent: Leave { id: 12582915, rpt: Point { x: 1905, y: 343 }, wpt: Point { x: 1883, y: 297 } }
16:01:06 [DEBUG] (1) penrose::core::manager: Handling event action: ClientFocusLost(12582915)
16:01:06 [DEBUG] (1) penrose::core::manager: Handling event action: SetScreenFromPoint(Some(Point { x: 1905, y: 343 }))
16:01:06 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:06 [DEBUG] (1) penrose::core::manager: Got XEvent: Enter { id: 12582915, rpt: Point { x: 1894, y: 194 }, wpt: Point { x: 1872, y: 148 } }
16:01:06 [DEBUG] (1) penrose::core::manager: Handling event action: ClientFocusGained(12582915)
16:01:06 [DEBUG] (1) penrose::core::manager: Running focus_change hooks
16:01:06 [DEBUG] (1) penrose::core::manager: Handling event action: SetScreenFromPoint(Some(Point { x: 1894, y: 194 }))
16:01:06 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:06 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12582915, atom: "_NET_ACTIVE_WINDOW", is_root: false }
16:01:06 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12582915, "_NET_ACTIVE_WINDOW", false)
16:01:06 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:07 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12582915, atom: "_NET_WM_USER_TIME", is_root: false }
16:01:07 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12582915, "_NET_WM_USER_TIME", false)
16:01:07 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:07 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12582915, atom: "_NET_WM_OPAQUE_REGION", is_root: false }
16:01:07 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12582915, "_NET_WM_OPAQUE_REGION", false)
16:01:07 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:07 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12582915, atom: "_NET_WM_OPAQUE_REGION", is_root: false }
16:01:07 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12582915, "_NET_WM_OPAQUE_REGION", false)
16:01:07 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:07 [DEBUG] (1) penrose::core::manager: Got XEvent: ConfigureNotify { id: 12582965, r: Region { x: 1591, y: 107, w: 308, h: 651 }, is_root: false }
16:01:07 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:07 [DEBUG] (1) penrose::core::manager: Got XEvent: ClientMessage { id: 12582965, dtype: "_NET_WM_STATE", data: [0, 404, 0, 1, 0] }
16:01:07 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:07 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12582915, atom: "_NET_WM_OPAQUE_REGION", is_root: false }
16:01:07 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12582915, "_NET_WM_OPAQUE_REGION", false)
16:01:07 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:07 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12582915, atom: "_NET_WM_OPAQUE_REGION", is_root: false }
16:01:07 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12582915, "_NET_WM_OPAQUE_REGION", false)
16:01:07 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:07 [DEBUG] (1) penrose::core::manager: Got XEvent: ConfigureNotify { id: 12582965, r: Region { x: 1591, y: 107, w: 308, h: 656 }, is_root: false }
16:01:07 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:07 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12582915, atom: "_NET_WM_OPAQUE_REGION", is_root: false }
16:01:07 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12582915, "_NET_WM_OPAQUE_REGION", false)
16:01:07 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:07 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12582915, atom: "_NET_WM_OPAQUE_REGION", is_root: false }
16:01:07 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12582915, "_NET_WM_OPAQUE_REGION", false)
16:01:07 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:08 [DEBUG] (1) penrose::core::manager: Got XEvent: Enter { id: 12582915, rpt: Point { x: 1657, y: 739 }, wpt: Point { x: 1635, y: 693 } }
16:01:08 [DEBUG] (1) penrose::core::manager: Handling event action: ClientFocusGained(12582915)
16:01:08 [DEBUG] (1) penrose::core::manager: Running focus_change hooks
16:01:08 [DEBUG] (1) penrose::core::manager: Handling event action: SetScreenFromPoint(Some(Point { x: 1657, y: 739 }))
16:01:08 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:08 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12582915, atom: "_NET_WM_OPAQUE_REGION", is_root: false }
16:01:08 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12582915, "_NET_WM_OPAQUE_REGION", false)
16:01:08 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:08 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12582915, atom: "_NET_WM_OPAQUE_REGION", is_root: false }
16:01:08 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12582915, "_NET_WM_OPAQUE_REGION", false)
16:01:08 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:08 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12582915, atom: "_NET_ACTIVE_WINDOW", is_root: false }
16:01:08 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12582915, "_NET_ACTIVE_WINDOW", false)
16:01:08 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:08 [DEBUG] (1) penrose::core::manager: Got XEvent: ClientMessage { id: 12583022, dtype: "_NET_WM_STATE", data: [0, 404, 0, 1, 0] }
16:01:08 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:08 [DEBUG] (1) penrose::core::manager: Got XEvent: MapRequest { id: 12583022, ignore: false }
16:01:08 [DEBUG] (1) penrose::core::manager: Handling event action: MapWindow(12583022)
16:01:08 [DEBUG] (1) penrose::core::manager: Handling map request: name[Quit and close tabs?] id[12583022] class[Firefox] type[?]
16:01:08 [DEBUG] (1) penrose::core::manager: Running new_client hooks
16:01:08 [DEBUG] (1) penrose::core::manager: Running client_added_to_workspace hooks
16:01:08 [DEBUG] (1) penrose::core::manager: Running focus_change hooks
16:01:08 [DEBUG] (1) penrose::core::manager: Attempting to layout workspace 2
16:01:08 [DEBUG] (1) penrose::core::workspace: applying '[side]' layout for 1 clients on workspace '3'
16:01:08 [DEBUG] (1) penrose::core::manager::util: configuring 12582915 with Some(Region { x: 0, y: 24, w: 1920, h: 919 })
16:01:08 [DEBUG] (1) penrose::core::manager: Running layout_applied hooks
16:01:08 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:08 [DEBUG] (1) penrose::core::manager: Got XEvent: ConfigureNotify { id: 12583022, r: Region { x: 20, y: 44, w: 65493, h: 65493 }, is_root: false }
16:01:08 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:08 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12583022, atom: "_NET_ACTIVE_WINDOW", is_root: false }
16:01:08 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12583022, "_NET_ACTIVE_WINDOW", false)
16:01:08 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:08 [DEBUG] (1) penrose::core::manager: Got XEvent: Leave { id: 12582915, rpt: Point { x: 1657, y: 739 }, wpt: Point { x: 1635, y: 693 } }
16:01:08 [DEBUG] (1) penrose::core::manager: Handling event action: ClientFocusLost(12582915)
16:01:08 [DEBUG] (1) penrose::core::manager: Handling event action: SetScreenFromPoint(Some(Point { x: 1657, y: 739 }))
16:01:08 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:08 [DEBUG] (1) penrose::core::manager: Got XEvent: Enter { id: 12583022, rpt: Point { x: 1657, y: 739 }, wpt: Point { x: 1635, y: 693 } }
16:01:08 [DEBUG] (1) penrose::core::manager: Handling event action: ClientFocusGained(12583022)
16:01:08 [DEBUG] (1) penrose::core::manager: Running focus_change hooks
16:01:08 [DEBUG] (1) penrose::core::manager: Handling event action: SetScreenFromPoint(Some(Point { x: 1657, y: 739 }))
16:01:08 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:08 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12583022, atom: "_NET_ACTIVE_WINDOW", is_root: false }
16:01:08 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12583022, "_NET_ACTIVE_WINDOW", false)
16:01:08 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:08 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12583022, atom: "WM_HINTS", is_root: false }
16:01:08 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12583022, "WM_HINTS", false)
16:01:08 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:08 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12583022, atom: "_NET_WM_OPAQUE_REGION", is_root: false }
16:01:08 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12583022, "_NET_WM_OPAQUE_REGION", false)
16:01:08 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:09 [DEBUG] (1) penrose::core::manager: Got XEvent: PropertyNotify { id: 12583022, atom: "_NET_WM_USER_TIME", is_root: false }
16:01:09 [DEBUG] (1) penrose::core::manager: Handling event action: UnknownPropertyChange(12583022, "_NET_WM_USER_TIME", false)
16:01:09 [DEBUG] (1) penrose::core::manager: Running event_handled hooks
16:01:09 [DEBUG] (1) penrose::core::manager: Got XEvent: KeyPress(KeyCode { mask: 8, code: 11 })
16:01:09 [DEBUG] (1) penrose::core::manager: Handling event action: RunKeyBinding(KeyCode { mask: 8, code: 11 })
16:01:09 [DEBUG] (1) penrose::core::manager: handling key code: KeyCode { mask: 8, code: 11 }
16:01:09 [DEBUG] (1) penrose::core::manager: Attempting to layout workspace 1

Scheenshots:

Before switching to another workspace
image

After switching to another workspace and back:
image

The window/pop-up is still open in the second schreenshot, pressing enter on it closes Firefox, since "Close Tabs" button is selected by default.

If there are other windows in the workspace they get hidden away as well when switching to another workspace and back.

@sminez
Copy link
Owner

sminez commented Feb 7, 2021

I've got a branch I'm working on at the moment that follows the advice given by @psychon on #120 around respecting client hints correctly. From my local testing this seems to work for everything I've tried other than Firefox... 😕

If I add more logging around when windows are mapped and removed, it looks like there is no map request coming through for the dialog the second time it should be shown. I assume I'm not currently listening for whatever X event it uses in that case?

@AdrienDML , @glyphpoch are either of you able to get this behaviour for programs other than Firefox?

@Aleod-m
Copy link
Author

Aleod-m commented Feb 8, 2021

From what i experienced i had that using zoom too(:vomiting_face:) cause i need it to follow my courses.

@psychon
Copy link
Contributor

psychon commented Feb 8, 2021

Random guess that might have nothing to do with this issue: You are not setting WM_STATE.
https://tronche.com/gui/x/icccm/sec-4.html#s-4.1.3.1

@sminez
Copy link
Owner

sminez commented Feb 8, 2021

Yeah I was wondering about that...I've been trying to follow dwm as an example and couldn't see it being set there which made me think that this approach should have been fine. I'll give that a go tonight and see if it helps

@sminez
Copy link
Owner

sminez commented Feb 8, 2021

Urgh, right: I was so busy looking at events around focus etc that I've completely missed WM_STATE stuff 🤦

Even if that isn't the whole story, it needs fixing

@legendofmiracles
Copy link

legendofmiracles commented Feb 17, 2021

I have the same thing, but with the "Enter your master password" window for the passwords saved in firefox.

Is there anything manual i can do, before this gets in upstream?

sminez added a commit that referenced this issue Feb 21, 2021
Penrose still doesn't correctly manage all window types but this seems
to allow for sorting out windows that don't set a window type (such as
'st' or 'mpv') and also prevents transients and 'unviewable' windows
from being mapped on restart.

I suspect that handling around floating clients is still wonky but I
need to get some clean reproducible test cases to work with. Firefox is
behaving very strangely when being closed at the moment and I'm not sure
if it's due to how penrose is closing the window (only Firefox seems
affected) or if it is something wrong with my system...
@tw4452852
Copy link

tw4452852 commented Mar 2, 2021

I encountered the same problem when starting thunderbird with a prompt window popped up.

teo8192 pushed a commit to teo8192/penrose that referenced this issue Nov 24, 2021
Penrose still doesn't correctly manage all window types but this seems
to allow for sorting out windows that don't set a window type (such as
'st' or 'mpv') and also prevents transients and 'unviewable' windows
from being mapped on restart.

I suspect that handling around floating clients is still wonky but I
need to get some clean reproducible test cases to work with. Firefox is
behaving very strangely when being closed at the moment and I'm not sure
if it's due to how penrose is closing the window (only Firefox seems
affected) or if it is something wrong with my system...
@sminez
Copy link
Owner

sminez commented Jun 10, 2023

This should be fixed now as of ca9ea78

I've confirmed working behaviour on Chromium and Discord but I don't currently have Firefox installed so if someone who does is able to verify we can close this one 👍

@sminez
Copy link
Owner

sminez commented Jun 10, 2023

closing in favour of #231

@sminez sminez closed this as completed Jun 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants