XWorkstation.st
branchjv
changeset 6916 2a4ce6c4d0b5
parent 6915 7f3a3fe5b871
child 6925 4d77a816de2c
equal deleted inserted replaced
6915:7f3a3fe5b871 6916:2a4ce6c4d0b5
    30 		selectionOwner clipboardSelectionTime primarySelectionTime
    30 		selectionOwner clipboardSelectionTime primarySelectionTime
    31 		selectionFetchers selectionHandlers preWaitAction xlibTimeout
    31 		selectionFetchers selectionHandlers preWaitAction xlibTimeout
    32 		xlibTimeoutForWindowCreation hasConnectionBroken uniqueDeviceID
    32 		xlibTimeoutForWindowCreation hasConnectionBroken uniqueDeviceID
    33 		stxDeviceAtom uuidAtom primaryBuffer windowGroupWindow
    33 		stxDeviceAtom uuidAtom primaryBuffer windowGroupWindow
    34 		maxOperationsUntilFlush operationsUntilFlush lastError hostname 
    34 		maxOperationsUntilFlush operationsUntilFlush lastError hostname 
    35 		wmClientLeaderAtom wmClientMachineAtom wmClassName wmClassClass'
    35 		wmClientLeaderAtom wmClientMachineAtom wmClassName wmClassClass
       
    36 		pid netWmPidAtom'
    36 	classVariableNames:'RawKeySymTranslation ConservativeSync MaxStringLength
    37 	classVariableNames:'RawKeySymTranslation ConservativeSync MaxStringLength
    37 		DefaultXLibTimeout DefaultXLibTimeoutForWindowCreation
    38 		DefaultXLibTimeout DefaultXLibTimeoutForWindowCreation
    38 		ErrorDBCache'
    39 		ErrorDBCache'
    39 	poolDictionaries:''
    40 	poolDictionaries:''
    40 	category:'Interface-Graphics'
    41 	category:'Interface-Graphics'
  1883     int flags = 0, depth, ioClass;
  1884     int flags = 0, depth, ioClass;
  1884     Atom WmDeleteWindowAtom, WmSaveYourselfAtom, WmProtocolsAtom;
  1885     Atom WmDeleteWindowAtom, WmSaveYourselfAtom, WmProtocolsAtom;
  1885     Atom WmQuitAppAtom, MotifWMHintsAtom;
  1886     Atom WmQuitAppAtom, MotifWMHintsAtom;
  1886     Atom WmClientLeaderAtom;
  1887     Atom WmClientLeaderAtom;
  1887     Atom WmClientMachineAtom;
  1888     Atom WmClientMachineAtom;
       
  1889     Atom NetWmPidAtom;
  1888     Atom STXDeviceAtom, UUIDAtom;
  1890     Atom STXDeviceAtom, UUIDAtom;
  1889     Atom atoms[3];
  1891     Atom atoms[3];
  1890     int atomCount = 0;
  1892     int atomCount = 0;
  1891 
  1893 
  1892     sizehints.flags = 0;
  1894     sizehints.flags = 0;
  2083 	    __INST(wmClientLeaderAtom) = __MKATOMOBJ(WmClientLeaderAtom);
  2085 	    __INST(wmClientLeaderAtom) = __MKATOMOBJ(WmClientLeaderAtom);
  2084 
  2086 
  2085 	    WmClientMachineAtom = XInternAtom(dpy, "WM_CLIENT_MACHINE", False);
  2087 	    WmClientMachineAtom = XInternAtom(dpy, "WM_CLIENT_MACHINE", False);
  2086 	    __INST(wmClientMachineAtom) = __MKATOMOBJ(WmClientMachineAtom);
  2088 	    __INST(wmClientMachineAtom) = __MKATOMOBJ(WmClientMachineAtom);
  2087 
  2089 
       
  2090 	    NetWmPidAtom = XInternAtom(dpy, "_NET_WM_PID", False);
       
  2091 	    __INST(netWmPidAtom) = __MKATOMOBJ(NetWmPidAtom);
       
  2092 
  2088 	    UUIDAtom = XInternAtom(dpy, "UUID", False);
  2093 	    UUIDAtom = XInternAtom(dpy, "UUID", False);
  2089 	    __INST(uuidAtom) = __MKATOMOBJ(UUIDAtom);
  2094 	    __INST(uuidAtom) = __MKATOMOBJ(UUIDAtom);
  2090 	    STXDeviceAtom = XInternAtom(dpy, "STX_DEVICE_ID", False);
  2095 	    STXDeviceAtom = XInternAtom(dpy, "STX_DEVICE_ID", False);
  2091 	    __INST(stxDeviceAtom) = __MKATOMOBJ(STXDeviceAtom);
  2096 	    __INST(stxDeviceAtom) = __MKATOMOBJ(STXDeviceAtom);
  2092 
  2097 
  2104 #else
  2109 #else
  2105 	    WmSaveYourselfAtom = 0;
  2110 	    WmSaveYourselfAtom = 0;
  2106 #endif
  2111 #endif
  2107 	    WmClientLeaderAtom = __AtomVal(__INST(wmClientLeaderAtom));
  2112 	    WmClientLeaderAtom = __AtomVal(__INST(wmClientLeaderAtom));
  2108 	    WmClientMachineAtom = __AtomVal(__INST(wmClientMachineAtom));
  2113 	    WmClientMachineAtom = __AtomVal(__INST(wmClientMachineAtom));
       
  2114 	    NetWmPidAtom = __AtomVal(__INST(netWmPidAtom));
       
  2115 
  2109 	    UUIDAtom = __AtomVal(__INST(uuidAtom));;
  2116 	    UUIDAtom = __AtomVal(__INST(uuidAtom));;
  2110 	    STXDeviceAtom = __AtomVal(__INST(stxDeviceAtom));;
  2117 	    STXDeviceAtom = __AtomVal(__INST(stxDeviceAtom));;
  2111 	}
  2118 	}
  2112 
  2119 
  2113 	/*
  2120 	/*
  2144 	    }
  2151 	    }
  2145 	}
  2152 	}
  2146 
  2153 
  2147 	ENTER_XLIB();
  2154 	ENTER_XLIB();
  2148 	/* 
  2155 	/* 
  2149 	 * Required by ICCCM (https://tronche.com/gui/x/icccm/sec-5.html)
  2156 	 * Defined by ICCCM (https://tronche.com/gui/x/icccm/sec-5.html)
  2150 	 * Section 5.1. Client Support for Session Management,         
  2157 	 * Section 5.1. Client Support for Session Management,         
  2151          */
  2158          */
  2152 	XChangeProperty (dpy, newWindow, WmClientLeaderAtom, XA_WINDOW, 32, 
  2159 	XChangeProperty (dpy, newWindow, WmClientLeaderAtom, XA_WINDOW, 32, 
  2153 	                 PropModeReplace, (unsigned char *)&windowGroupWindow, 1);
  2160 	                 PropModeReplace, (unsigned char *)&windowGroupWindow, 1);
  2154 	/* 
  2161 	/* 
  2169 
  2176 
  2170 	if (__isStringLike(__INST(wmClassName))) {
  2177 	if (__isStringLike(__INST(wmClassName))) {
  2171 	    classhint.res_name = (char *) __stringVal(__INST(wmClassName));
  2178 	    classhint.res_name = (char *) __stringVal(__INST(wmClassName));
  2172 	}	
  2179 	}	
  2173 	XSetClassHint(myDpy, newWindow, &classhint);
  2180 	XSetClassHint(myDpy, newWindow, &classhint);
       
  2181         /*
       
  2182 	 * Defined by EWMH, http://standards.freedesktop.org/wm-spec/1.3
       
  2183 	 * Section Application Window Properties
       
  2184 	 */
       
  2185 	if (__isInteger(__INST(pid))) {
       
  2186 	int pid = __intVal(__INST(pid));
       
  2187 	XChangeProperty (dpy, newWindow, NetWmPidAtom, XA_CARDINAL, 32, 
       
  2188 	                 PropModeReplace, (unsigned char *)&pid, 1);
       
  2189 	}	
  2174 	LEAVE_XLIB();
  2190 	LEAVE_XLIB();
  2175 
  2191 
  2176 #ifdef SUPPORT_MOTIF_WM_HINTS
  2192 #ifdef SUPPORT_MOTIF_WM_HINTS
  2177 	/*
  2193 	/*
  2178 	 * less decoration
  2194 	 * less decoration
  8912     wmClassName = 'stx' ifTrue:[
  8928     wmClassName = 'stx' ifTrue:[
  8913     	wmClassName  := 'smalltalkx'.
  8929     	wmClassName  := 'smalltalkx'.
  8914 	wmClassClass := 'SmalltalkX'.
  8930 	wmClassClass := 'SmalltalkX'.
  8915     ] ifFalse:[
  8931     ] ifFalse:[
  8916 	wmClassClass := wmClassName asUppercaseFirst.
  8932 	wmClassClass := wmClassName asUppercaseFirst.
  8917     ]
  8933     ].
  8918 
  8934     "
       
  8935     Cache pid in order to set _NET_WM_PID properu
       
  8936     (defined by EWMH, Section Application Window Properties
       
  8937     "
       
  8938     pid := OperatingSystem getProcessId.
  8919 
  8939 
  8920     "Modified (comment): / 17-04-2012 / 21:18:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  8940     "Modified (comment): / 17-04-2012 / 21:18:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  8921 !
  8941 !
  8922 
  8942 
  8923 initializeDeviceSignals
  8943 initializeDeviceSignals