preserve mouse coordinates from xlib button events

This commit is contained in:
Ryan Fleury
2025-05-10 17:08:40 -07:00
parent 0a3869981f
commit 6df96b7eef
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ if [ -v rdi_from_pdb ]; then didbuild=1 && $compile ../src/rdi_from_pdb
if [ -v rdi_from_dwarf ]; then didbuild=1 && $compile ../src/rdi_from_dwarf/rdi_from_dwarf.c $compile_link $out rdi_from_dwarf; fi
if [ -v rdi_dump ]; then didbuild=1 && $compile ../src/rdi_dump/rdi_dump_main.c $compile_link $out rdi_dump; fi
if [ -v rdi_breakpad_from_pdb ]; then didbuild=1 && $compile ../src/rdi_breakpad_from_pdb/rdi_breakpad_from_pdb_main.c $compile_link $out rdi_breakpad_from_pdb; fi
if [ -v ryan_scratch ]; then didbuild=1 && $compile ../src/scratch/ryan_scratch.c $compile_link $link_os_gfx $link_render $out ryan_scratch; fi
if [ -v ryan_scratch ]; then didbuild=1 && $compile ../src/scratch/ryan_scratch.c $compile_link $link_os_gfx $link_render $link_font_provider $out ryan_scratch; fi
cd ..
# --- Warn On No Builds -------------------------------------------------------
+2
View File
@@ -391,6 +391,7 @@ os_get_events(Arena *arena, B32 wait)
case ',':{key = OS_Key_Comma;}break;
case '/':{key = OS_Key_Slash;}break;
case '\\':{key = OS_Key_BackSlash;}break;
case '\t':{key = OS_Key_Tab;}break;
case 'a':case 'A':{key = OS_Key_A;}break;
case 'b':case 'B':{key = OS_Key_B;}break;
case 'c':case 'C':{key = OS_Key_C;}break;
@@ -454,6 +455,7 @@ os_get_events(Arena *arena, B32 wait)
e->window.u64[0] = (U64)window;
e->modifiers = modifiers;
e->key = key;
e->pos = v2f32((F32)evt.xbutton.x, (F32)evt.xbutton.y);
}break;
//- rjf: mouse motion