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

Splash window for Qt applications is assigned a dialog type #3322

Open
steelman opened this issue Apr 7, 2021 · 1 comment
Open

Splash window for Qt applications is assigned a dialog type #3322

steelman opened this issue Apr 7, 2021 · 1 comment

Comments

@steelman
Copy link

steelman commented Apr 7, 2021

awesome v4.3 (Too long)
• Compiled against Lua 5.3.3 (running with Lua 5.3)
• D-Bus support: ✔
• execinfo support: ✔
• xcb-randr version: 1.6
• LGI version: 0.9.2

How to reproduce the issue:

Run LibreCAD or FreeCAD or probably any other Qt application which shows a splash window using Qt::SplashScreen.

Actual result:

The splash window is displayed with a title bar.

Expected result:

The splash window is displayed with a title bar.

Additional observations

LibreOffice shows a splash window without a title bar.

FreeCAD and LibreCAD splash windows trigger property::type signal with type set to dialog.

xprop(1) output for FreeCAD splash window

_NET_WM_DESKTOP(CARDINAL) = 15
_NET_FRAME_EXTENTS(CARDINAL) = 2, 2, 22, 2
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
awful.client.property.single_instance_id(UTF8_STRING) = 
WM_TRANSIENT_FOR(WINDOW): window id # 0x5a0000e
_NET_WM_ICON_NAME(UTF8_STRING) = 
_NET_WM_ICON(CARDINAL) =        Icon (64 x 64):

<icon wuz here>

XdndAware(ATOM) = BITMAP
WM_NAME(STRING) = 
_NET_WM_NAME(UTF8_STRING) = "FreeCAD"
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_SPLASH, _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x5a0000e
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: True
                Initial state is Normal State.
_NET_WM_PID(CARDINAL) = 14328
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 94371863
WM_CLASS(STRING) = "freecad", "FreeCAD"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified location: 483, 262
                user specified size: 399 by 244
                window gravity: NorthWest

I suspect that c->has_NET_WM_WINDOW_TYPE in property_update_wm_transient_for() is false (but why?) and client type is set to WINDOW_TYPE_DIALOG.

@psychon
Copy link
Member

psychon commented Apr 11, 2021

Random guess where the dialog comes from:

awesome/property.c

Lines 122 to 123 in fda950d

if (!c->has_NET_WM_WINDOW_TYPE)
client_set_type(L, -1, trans == XCB_NONE ? WINDOW_TYPE_NORMAL : WINDOW_TYPE_DIALOG);

Possible fix:

diff --git a/objects/client.c b/objects/client.c
index f3754a1ec..b4952faf2 100644
--- a/objects/client.c
+++ b/objects/client.c
@@ -1965,6 +1965,10 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, xcb_get_window_at
     c->size_hints_honor = true;
     luaA_object_emit_signal(L, -1, "property::size_hints_honor", 0);
 
+    /* Then check clients hints (must check _NET_WM_WINDOW_TYPE before
+     * WM_TRANSIENT_FOR in client_update_properties()) */
+    ewmh_client_check_hints(c);
+
     /* update all properties */
     client_update_properties(L, -1, c);
 
@@ -1976,9 +1980,6 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, xcb_get_window_at
     /* Put the window in normal state. */
     xwindow_set_state(c->window, XCB_ICCCM_WM_STATE_NORMAL);
 
-    /* Then check clients hints */
-    ewmh_client_check_hints(c);
-
     /* Push client in stack */
     stack_client_push(c);
 

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

No branches or pull requests

2 participants