Open aseren opened 9 months ago
Need to investigate X11Window::IsActive() usage for Brave Ads IsForeground() check. The current solution uses _NET_ACTIVE_WINDOW window property https://github.com/brave/brave-core/blob/master/components/brave_ads/browser/background_helper_linux.cc, but it is not working for the WMII window manager. See comment for X11Window::Activate():
IsForeground()
_NET_ACTIVE_WINDOW
WMII
X11Window::Activate()
void X11Window::Activate() { if (!IsVisible() || !activatable_) return; BeforeActivationStateChanged(); ignore_keyboard_input_ = false; // wmii says that it supports _NET_ACTIVE_WINDOW but does not. // https://code.google.com/p/wmii/issues/detail?id=266 static bool wm_supports_active_window = GuessWindowManager() != WM_WMII && WmSupportsHint(x11::GetAtom("_NET_ACTIVE_WINDOW"));
Ubuntu 22 defaults to Wayland.
Need to investigate X11Window::IsActive() usage for Brave Ads
IsForeground()
check.The current solution uses
_NET_ACTIVE_WINDOW
window property https://github.com/brave/brave-core/blob/master/components/brave_ads/browser/background_helper_linux.cc, but it is not working for theWMII
window manager. See comment forX11Window::Activate()
: