Bug 4250 - [patch] reload _MOTIF_WM_HINTS property when it changes
Status: CLOSED FIXED
Alias: None
Product: Openbox
Classification: Unclassified
Component: general
Version: 3.4.7.2
Hardware: PC Linux
: P3 normal
Assignee: Dana Jansens
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2009-07-28 10:03 EDT by Daniel Erat
Modified: 2009-12-16 16:55:44 EST
1 user (show)

See Also:


Attachments
patch to fix the issue (1.90 KB, patch)
2009-07-28 10:03 EDT, Daniel Erat

Description Daniel Erat 2009-07-28 10:03:37 EDT
Created attachment 2097 [details]
patch to fix the issue

(I sent this to the mailing list but didn't get a response -- sorry for the duplication.)

The Chrome web browser has a feature where it draws its own window decorations.  When this setting is toggled, Chrome calls gtk_window_set_decorated(), which makes GTK change the window's requested decorated state via the _MOTIF_WM_HINTS property.  Openbox honors this property on new windows but doesn't currently reload it in response to PropertyNotify events, so already-open windows don't get updated when the setting is changed.  The attached patch "fixes" this (I use quotes because I can't find any specs describing how _MOTIF_WM_HINTS is supposed to be applied, although I've confirmed that both Metacity and Compiz reload it when it changes).
Comment 1 Mikachu 2009-09-20 09:29:36 EDT
I've done something similar to this in git now, but i just made the get function not static and put the type_and_transient and setup_decor in event.c directly like how it's done for the other hints. I don't see why get_state or update_normal_hints would be needed?
Comment 2 Daniel Erat 2009-09-20 11:03:36 EDT
Yeah, I think that's correct -- looking at the code again, only client_get_type_and_transientness() is needed.  Thanks!
Comment 3 Dana Jansens 2009-12-16 16:55:44 EST
closing this