react-x11 2.8.0 → 2.8.1

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.0",
3
+ "version": "2.8.1",
4
4
  "description": "react renderer with X11 as a target",
5
5
  "main": "./src/index.js",
6
6
  "files": [
package/src/cocoa/app.js CHANGED
@@ -612,9 +612,15 @@ export class CocoaApp {
612
612
  );
613
613
  }
614
614
 
615
- _tickFrames() {
615
+ /**
616
+ * Run every frame that is due at `now`. The pump tick and the frame
617
+ * timer read the clock; a test names the moment, so that what a tick
618
+ * decides is a fact about that moment and not about how long the test
619
+ * took to ask — a shared runner stalls for milliseconds between two
620
+ * lines.
621
+ */
622
+ _tickFrames(now = performance.now()) {
616
623
  if (!this._rafQueue.length) return;
617
- const now = performance.now();
618
624
  // Each window keeps its own clock, so a window on a 120Hz panel paints
619
625
  // every refresh while one on a 60Hz monitor paints every other pump
620
626
  // tick. Decided once per clock per tick: every frame a window queued
package/src/nodes.js CHANGED
@@ -10473,8 +10473,18 @@ export class WindowNode extends Scrollable(Node) {
10473
10473
  * and advertising lazily would race sources that cache the window list
10474
10474
  * at drag start. A window with no registered drop targets answers "not
10475
10475
  * accepting" once per entry instead (DropSession).
10476
+ *
10477
+ * The one exception is a `<popup dragPreview>`. It follows the pointer,
10478
+ * so for the whole gesture it is the frontmost window under it, and it
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.
10476
10485
  */
10477
10486
  _initDnd() {
10487
+ if (this.props.dragPreview) return;
10478
10488
  const wnd = this.window;
10479
10489
  const X = this.app?.X;
10480
10490
  // A backend with drop machinery of its own (the cocoa backend's
@@ -436,8 +436,11 @@ 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, so a `<popup dragPreview>` can follow the
440
- * pointer without swallowing its own drag. See `useDragSource`.
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`.
441
444
  */
442
445
  dragPreview?: boolean;
443
446
  /**