32 lines
1.5 KiB
HTML
32 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<style>
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
body { background: #1e1e2e; color: #cdd6f4; font-family: monospace; font-size: 14px; }
|
|
h2 { padding: 20px 40px 10px; }
|
|
p { padding: 0 40px 10px; color: #a6adc8; }
|
|
#log { padding: 10px 40px; color: #a6e3a1; white-space: pre-wrap; max-height: 80vh; overflow-y: auto; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h2>Resize Test - Native C Library</h2>
|
|
<p>The C library (libagor-resize.so) connects button-press-event directly on the GtkWindow.</p>
|
|
<p>It does edge hit-test internally (8px border) and calls gtk_window_begin_resize_drag.</p>
|
|
<p><b>Move your mouse to the window edges. Click and drag to resize.</b></p>
|
|
<p>No RPC needed. Check the terminal for [agor-resize] logs.</p>
|
|
<p>Window size: <span id="size"></span></p>
|
|
<div id="log"></div>
|
|
<script>
|
|
const sizeEl = document.getElementById('size');
|
|
const logEl = document.getElementById('log');
|
|
function L(msg) { logEl.textContent += msg + '\n'; }
|
|
function updateSize() { sizeEl.textContent = window.innerWidth + 'x' + window.innerHeight; }
|
|
updateSize();
|
|
window.addEventListener('resize', () => { updateSize(); L('RESIZE: ' + window.innerWidth + 'x' + window.innerHeight); });
|
|
L('Page loaded. Native C library handles resize - watch terminal for [agor-resize] logs.');
|
|
L('Click near any edge (within 8px of window border) to trigger native resize.');
|
|
</script>
|
|
</body>
|
|
</html>
|