react-x11 2.8.1 → 2.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-x11",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
4
4
  "description": "react renderer with X11 as a target",
5
5
  "main": "./src/index.js",
6
6
  "files": [
@@ -98,7 +98,7 @@
98
98
  "yoga-layout": "^3.2.1"
99
99
  },
100
100
  "optionalDependencies": {
101
- "@windowkit/appkit": "^0.5.1",
101
+ "@windowkit/appkit": "^0.6.0",
102
102
  "dbus-native": "^0.15.1",
103
103
  "x11-dri": "^0.7.0"
104
104
  },
@@ -68,6 +68,16 @@ export class CocoaWindow {
68
68
  attributes.visual !== undefined || attributes.transparent;
69
69
  this._transparentWindow = Boolean(transparent);
70
70
  if (transparent) options.opaque = false;
71
+ // A `<popup dragPreview>` follows the pointer, so for the whole gesture
72
+ // it is the window the window server finds under it — and AppKit does
73
+ // not look past a window that registered no dragged types: the drag
74
+ // simply has no destination, and the window beneath never hears of it.
75
+ // Transparent to the pointer, the preview is passed over and the hit
76
+ // reaches what it covers (#488; @windowkit/appkit >= 0.6.0, an older
77
+ // bridge ignores the option). The drop side is excluded separately:
78
+ // nodes.js `_initDnd` gives a preview no DropSession and registers
79
+ // nothing.
80
+ if (attributes.dragPreview) options.ignoresMouseEvents = true;
71
81
  // The root layer's background is the "what newly exposed area shows"
72
82
  // attribute an X window has — worth seeding on an opaque window so a
73
83
  // resize flashes the right colour. On a transparent one it would sit
package/src/nodes.js CHANGED
@@ -10477,11 +10477,13 @@ export class WindowNode extends Scrollable(Node) {
10477
10477
  * The one exception is a `<popup dragPreview>`. It follows the pointer,
10478
10478
  * so for the whole gesture it is the frontmost window under it, and it
10479
10479
  * must never be what the drag is over. Where react-x11 picks the target
10480
- * itself (src/dnd.js `topLevelAt`) it is skipped by name; where the OS
10481
- * picks AppKit routes a drag to the frontmost window registered for a
10482
- * type it carries, and looks past one that registered none — the only
10483
- * way to say so is to register nothing (#488). So a preview gets none of
10484
- * this: no session, no registry entry, no property.
10480
+ * itself (src/dnd.js `topLevelAt`) it is skipped by name. Where the OS
10481
+ * picks, registering nothing is not enough: AppKit finds the window
10482
+ * under the pointer first and does not look past one with no dragged
10483
+ * types the drag then has no destination at all so the cocoa window
10484
+ * is made transparent to the pointer instead (src/cocoa/window.js,
10485
+ * `ignoresMouseEvents`, #488). A preview still gets none of this: no
10486
+ * session, no registry entry, no property, nothing to refuse with.
10485
10487
  */
10486
10488
  _initDnd() {
10487
10489
  if (this.props.dragPreview) return;
@@ -436,11 +436,12 @@ export interface WindowProps
436
436
  xi2?: boolean | 'auto';
437
437
  /**
438
438
  * Mark this window as a drag preview: the drag router never treats it as
439
- * the window under the pointer, and it is never a drop destination on
440
- * the cocoa backend, where AppKit picks the destination, that is what
441
- * lets a drop reach the window beneath it. A `<popup dragPreview>` can
442
- * therefore follow the pointer without swallowing its own drag. Read when
443
- * the window is created. See `useDragSource`.
439
+ * the window under the pointer, it is never a drop destination, and on
440
+ * the cocoa backend where the window server picks the window under the
441
+ * pointer it is made transparent to the pointer, so a drop reaches the
442
+ * window beneath it. A `<popup dragPreview>` can therefore follow the
443
+ * pointer without swallowing its own drag. Read when the window is
444
+ * created. See `useDragSource`.
444
445
  */
445
446
  dragPreview?: boolean;
446
447
  /**