react-x11 2.22.10 → 2.22.11

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.22.10",
3
+ "version": "2.22.11",
4
4
  "description": "react renderer with X11 as a target",
5
5
  "main": "./src/index.js",
6
6
  "files": [
@@ -108,7 +108,7 @@
108
108
  "yoga-layout": "^3.2.1"
109
109
  },
110
110
  "optionalDependencies": {
111
- "@windowkit/appkit": "^0.15.0",
111
+ "@windowkit/appkit": "^0.16.0",
112
112
  "@windowkit/wayland": "^3.1.1",
113
113
  "@windowkit/win32": "^0.0.5",
114
114
  "dbus-native": "^0.15.1",
@@ -847,14 +847,23 @@ export class WindowNode extends Scrollable(Node) {
847
847
  }
848
848
  if (geometryChanged) {
849
849
  if (typeof wnd.setState === 'function') {
850
+ // Only what this commit changed, as the branch below does. ntk sends
851
+ // whatever differs from what the server last reported, and under a
852
+ // reparenting window manager that is not what was asked for: a
853
+ // position comes back in the frame's coordinates, and a size is the
854
+ // one the user dragged. Handed the rest anyway, a resize re-sent the
855
+ // position — the window jumped from where the manager had placed it
856
+ // (or the user had moved it) to where the app first asked — and a move
857
+ // re-sent a size the user had changed.
850
858
  wnd.setState({
851
- x: anchored ? undefined : geo.x,
852
- y: anchored ? undefined : geo.y,
859
+ x: movedByProps ? geo.x : undefined,
860
+ y: movedByProps ? geo.y : undefined,
853
861
  // `'auto'` is not a geometry ntk can be given: an axis the app has
854
862
  // handed back is left alone here and resolved by `_refit()` on the
855
863
  // layout this same commit is about to schedule.
856
- width: isAutoSize(geo.width) ? undefined : geo.width,
857
- height: isAutoSize(geo.height) ? undefined : geo.height,
864
+ width: sizeChanged && !isAutoSize(geo.width) ? geo.width : undefined,
865
+ height:
866
+ sizeChanged && !isAutoSize(geo.height) ? geo.height : undefined,
858
867
  });
859
868
  } else {
860
869
  // A window with no `setState` — Cocoa's — is resized whole or not at