ICCCM 2.0 Compliancy: correctly set NET_WM_CLASS and _NET_WM_PID properties
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 04 Jan 2013 17:23:44 +0100
changeset 5976 fc2bc2186bfa
parent 5975 3d74c7895143
child 5977 8d55715c166f
ICCCM 2.0 Compliancy: correctly set NET_WM_CLASS and _NET_WM_PID properties (only if UserPreferences current icccm20Compliant it set)
SimpleView.st
--- a/SimpleView.st	Fri Jan 04 17:23:33 2013 +0100
+++ b/SimpleView.st	Fri Jan 04 17:23:44 2013 +0100
@@ -1289,39 +1289,6 @@
     self updateAllStyleCaches.
 !
 
-updateAllStyleCaches
-    "reload all style caches in all view classes.
-     Needed after a style change or when a style file has been changed"
-
-    (Screen isNil or:[Screen current isNil]) ifTrue:[^ self].
-
-    "
-     tell all view classes to flush any
-     cached style-data
-    "
-    self changed:#style.
-    SimpleView updateStyleCache.
-    SimpleView allSubclassesDo:[:aClass |
-        "JV@2010-12-02: Removed to avoid lost of preferred fonts on image restart"
-        "/ cg: no, this is required!!!!!!
-        "/ otherwise, we get ugly courier fonts on windows
-        "/ updateStyleCache MUST clear any previously
-        "/ cached font values, otherwise you cannot load a style's font.
-        "/ if you want to keep your fonts, do it elsewhere (keep some userFontPrefs and restore from there)
-        aClass defaultFont:nil.
-        (aClass class includesSelector:#updateStyleCache) ifTrue:[
-            aClass updateStyleCache
-        ].
-    ]
-
-    "
-     View updateAllStyleCaches
-    "
-
-    "Modified: / 15-09-1998 / 22:04:15 / cg"
-    "Modified (format): / 05-10-2011 / 16:08:47 / az"
-!
-
 updateStyleCache
     "this method gets some heavily used style stuff and keeps
      it in class-variables for faster access.
@@ -3563,6 +3530,17 @@
     device setWindowClass:windowClassNameString name:nameString in:drawableId.
 !
 
+setWindowPid: pid
+    "Sets the _NET_WM_PID property for the window.
+     This may be used by the window manager to group windows.
+     If anIntegerOrNil is nil, then PID of currently running
+     Smalltalk is used"
+
+    device setWindowPid:pid in:drawableId.
+
+    "Created: / 04-01-2013 / 16:13:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 unmarkAsUnmappedModalBox
     flagBits := flagBits bitClear:FlagIsUnmappedModalBox
 ! !
@@ -10968,11 +10946,11 @@
 !SimpleView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.714 2012-12-14 09:09:15 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.715 2013-01-04 16:23:44 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.714 2012-12-14 09:09:15 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.715 2013-01-04 16:23:44 vrany Exp $'
 !
 
 version_SVN