Merge jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 27 Nov 2015 23:21:37 +0000
branchjv
changeset 7077 8827f34a4667
parent 7074 df7237d4bf77 (current diff)
parent 7076 b969091ec443 (diff)
child 7079 1fb540353824
Merge
SynchronousWindowSensor.st
XftFontDescription.st
--- a/SynchronousWindowSensor.st	Sat Nov 21 06:50:43 2015 +0100
+++ b/SynchronousWindowSensor.st	Fri Nov 27 23:21:37 2015 +0000
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1995 by Claus Gittinger
 	      All Rights Reserved
@@ -152,6 +154,9 @@
 basicPushEvent:anEvent
     "disptach the event immediately"
 
+    anEvent timeStamp isNil ifTrue:[
+        anEvent timeStamp:(Timestamp now).
+    ].
     WindowGroup lastEventQuerySignal answer:anEvent do:[
         anEvent view dispatchEvent:anEvent
     ].
@@ -160,9 +165,7 @@
 pushDamageEvent:anEvent
     "disptach the event immediately"
 
-    WindowGroup lastEventQuerySignal answer:anEvent do:[
-        anEvent view dispatchEvent:anEvent
-    ].
+    self basicPushEvent:anEvent
 !
 
 pushUserEvent:selector for:anyObject withArguments:argList
@@ -252,6 +255,6 @@
 !SynchronousWindowSensor class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/SynchronousWindowSensor.st,v 1.32 2015-03-03 10:38:49 cg Exp $'
+    ^ '$Header$'
 ! !
 
--- a/XftFontDescription.st	Sat Nov 21 06:50:43 2015 +0100
+++ b/XftFontDescription.st	Fri Nov 27 23:21:37 2015 +0000
@@ -616,7 +616,7 @@
      clipOrg clipCorn clipRect clipX clipY clipW clipH clipPnt
      fg fgR fgG fgB fgA fgPixel bg bgR bgG bgB bgA bgPixel
      drawX drawY drawPnt displayId screen drawableId error stringLen drawId drawIdIsShared
-     newXftDrawId newDrawableAssociation isPixmap|
+     newXftDrawId newDrawableAssociation pixmapDepth|
                                              
     "limit the string len, otherwise bad output is generated"
     stringLen := index2Arg - index1 + 1.
@@ -690,7 +690,9 @@
     ].
     screen := device screen.
     drawableId := aGC drawableId.
-    isPixmap := aGC isForm.
+    aGC isForm ifTrue:[
+        pixmapDepth := aGC depth.
+    ].
     aGC addDependent:self.      "I need to be informed, when the GC is destroyed"
 
     aGC class == XGraphicsContext ifTrue:[
@@ -699,9 +701,15 @@
         drawIdIsShared := false.
         drawId isNil ifTrue:[
 %{
-            if (isPixmap == true) {
-                drawId = XFT_DRAW_HANDLE_NEW ( XftDrawCreateBitmap ( DISPLAY( displayId ) ,
-                                               DRAWABLE( drawableId ) ) );            
+            if (pixmapDepth != nil) {
+                int __pixmapDepth = __intVal(pixmapDepth);
+                if (__pixmapDepth == 1) {      
+                    drawId = XFT_DRAW_HANDLE_NEW ( XftDrawCreateBitmap ( DISPLAY( displayId ) ,
+                                                   DRAWABLE( drawableId ) ) );           
+                } else {
+                    drawId = XFT_DRAW_HANDLE_NEW ( XftDrawCreateAlpha ( DISPLAY( displayId ) ,
+                                                   DRAWABLE( drawableId ), __pixmapDepth) );                      
+                }
             } else {
                 drawId = XFT_DRAW_HANDLE_NEW ( XftDrawCreate ( DISPLAY( displayId ) ,
                                                DRAWABLE( drawableId ) ,
@@ -742,9 +750,15 @@
 
     if (drawIdIsShared == true) {
     if (__INST(sharedDrawId) == nil) {
-        if (isPixmap == true) {
-            __sharedDrawId = XFT_DRAW_HANDLE_NEW ( XftDrawCreateBitmap ( DISPLAY( displayId ) ,
-                                                   DRAWABLE( drawableId ) ) );            
+       if (pixmapDepth != nil) {
+            int __pixmapDepth = __intVal(pixmapDepth);
+            if (__pixmapDepth == 1) {      
+                __sharedDrawId =  XftDrawCreateBitmap ( DISPLAY( displayId ) ,
+                                               DRAWABLE( drawableId ) );           
+            } else {
+                __sharedDrawId =  XftDrawCreateAlpha ( DISPLAY( displayId ) ,
+                                               DRAWABLE( drawableId ), __pixmapDepth);                      
+            }          
         } else {
             __sharedDrawId = XftDrawCreate(DISPLAY(displayId),
                                            DRAWABLE(drawableId),
@@ -832,7 +846,7 @@
         goto err;
     }
 
-    if (isPixmap == true) {
+    if (pixmapDepth != nil) {
         XftDrawDestroy(__sharedDrawId);
     }