20 |
20 |
21 DeviceWorkstation subclass:#XWorkstation |
21 DeviceWorkstation subclass:#XWorkstation |
22 instanceVariableNames:'hasShapeExtension hasShmExtension hasDPSExtension |
22 instanceVariableNames:'hasShapeExtension hasShmExtension hasDPSExtension |
23 hasMbufExtension hasXVideoExtension hasSaveUnder hasPEXExtension |
23 hasMbufExtension hasXVideoExtension hasSaveUnder hasPEXExtension |
24 hasImageExtension hasInputExtension hasXineramaExtension |
24 hasImageExtension hasInputExtension hasXineramaExtension |
25 hasRenderExtension hasXftLibrary hasWL hasWLClipboard |
25 hasRenderExtension hasXftLibrary ignoreBackingStore blackpixel |
26 ignoreBackingStore blackpixel whitepixel atoms protocolsAtom |
26 whitepixel atoms protocolsAtom deleteWindowAtom saveYourselfAtom |
27 deleteWindowAtom saveYourselfAtom quitAppAtom primaryAtom |
27 quitAppAtom primaryAtom clipboardAtom stringAtom wmStateAtom |
28 clipboardAtom stringAtom wmStateAtom motifWMHintsAtom |
28 motifWMHintsAtom listOfXFonts buttonsPressed eventRootX |
29 listOfXFonts buttonsPressed eventRootX eventRootY displayName |
29 eventRootY displayName eventTrace dispatchingExpose rgbVisual |
30 eventTrace dispatchingExpose rgbVisual rgbaVisual virtualRootId |
30 rgbaVisual virtualRootId rootId altModifierMask metaModifierMask |
31 rootId altModifierMask metaModifierMask lastEventTime |
31 lastEventTime rawMonitorBounds monitorBounds lastButtonPressTime |
32 rawMonitorBounds monitorBounds lastButtonPressTime |
|
33 deviceIOTimeoutErrorSignal activateOnClick rawKeySymTranslation |
32 deviceIOTimeoutErrorSignal activateOnClick rawKeySymTranslation |
34 selectionOwner clipboardSelectionTime primarySelectionTime |
33 selectionOwner clipboardSelectionTime primarySelectionTime |
35 selectionFetchers selectionHandlers preWaitAction xlibTimeout |
34 selectionFetchers selectionHandlers preWaitAction xlibTimeout |
36 xlibTimeoutForWindowCreation hasConnectionBroken uniqueDeviceID |
35 xlibTimeoutForWindowCreation hasConnectionBroken uniqueDeviceID |
37 stxDeviceAtom uuidAtom primaryBuffer windowGroupWindow |
36 stxDeviceAtom uuidAtom primaryBuffer windowGroupWindow |
9353 Cache pid in order to set _NET_WM_PID properu |
9352 Cache pid in order to set _NET_WM_PID properu |
9354 (defined by EWMH, Section Application Window Properties |
9353 (defined by EWMH, Section Application Window Properties |
9355 " |
9354 " |
9356 pid := OperatingSystem getProcessId. |
9355 pid := OperatingSystem getProcessId. |
9357 |
9356 |
9358 " |
|
9359 Detect whether we're running on XWayland |
|
9360 " |
|
9361 hasWL := (OperatingSystem getEnvironment: 'WAYLAND_DISPLAY') notNil. |
|
9362 |
|
9363 " |
|
9364 If running on XWayland, detect whether or not we have wl-copy |
|
9365 helper. |
|
9366 " |
|
9367 hasWL ifTrue: [ |
|
9368 hasWLClipboard := '/usr/bin/wl-copy' asFilename isExecutable. |
|
9369 ]. |
|
9370 |
|
9371 "Modified (comment): / 17-04-2012 / 21:18:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9357 "Modified (comment): / 17-04-2012 / 21:18:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9372 "Modified: / 16-12-2022 / 11:18:43 / Jan Vrany <jan.vrany@labware.com>" |
|
9373 ! |
9358 ! |
9374 |
9359 |
9375 initializeDeviceSignals |
9360 initializeDeviceSignals |
9376 super initializeDeviceSignals. |
9361 super initializeDeviceSignals. |
9377 |
9362 |
11620 We set both the PRIMARY and CLIPBOARD, so that you can paste |
11605 We set both the PRIMARY and CLIPBOARD, so that you can paste |
11621 into xterm." |
11606 into xterm." |
11622 |
11607 |
11623 clipboardSelectionTime := primarySelectionTime := lastEventTime. |
11608 clipboardSelectionTime := primarySelectionTime := lastEventTime. |
11624 |
11609 |
11625 hasWLClipboard ifTrue: [ |
11610 self setSelectionOwner:aWindowId of:clipboardAtom time:clipboardSelectionTime. |
11626 OperatingSystem executeCommand:'/usr/bin/wl-copy' inputFrom:aString readStream outputTo:nil errorTo:nil |
11611 self setSelectionOwner:aWindowId of:primaryAtom time:primarySelectionTime. |
11627 ] ifFalse: [ |
11612 |
11628 self setSelectionOwner:aWindowId of:clipboardAtom time:clipboardSelectionTime. |
11613 "Modified: / 17.6.1998 / 19:48:54 / cg" |
11629 self setSelectionOwner:aWindowId of:primaryAtom time:primarySelectionTime. |
|
11630 ]. |
|
11631 |
|
11632 "Modified: / 17-06-1998 / 19:48:54 / cg" |
|
11633 "Modified: / 16-12-2022 / 11:45:38 / Jan Vrany <jan.vrany@labware.com>" |
|
11634 ! |
11614 ! |
11635 |
11615 |
11636 setPrimaryText:aString owner:aWindowId |
11616 setPrimaryText:aString owner:aWindowId |
11637 "set the PRIMARY selection, and make aWindowId be the owner. |
11617 "set the PRIMARY selection, and make aWindowId be the owner. |
11638 This can be used by any other X application when middle-click |
11618 This can be used by any other X application when middle-click |