When i run an SDL code in some other os, the output i get is
But, while running the same code on garuda, i get a transparent window as:

I'm pretty sure there is nothing wrong with my SDL code, and its an issue in my os.
Below is my inxi:
System:
Kernel: 5.18.6-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.1.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=8f75a4c2-5beb-41e5-8b2f-31d9be194183 rw rootflags=subvol=@
i8042.nopnp=1 pci=nocrs quiet quiet splash rd.udev.log_priority=3
vt.global_cursor_default=0 loglevel=3
Desktop: KDE Plasma v: 5.25.1 tk: Qt v: 5.15.5 info: latte-dock
wm: kwin_x11 vt: 1 dm: 1: LightDM v: 1.30.0 note: stopped 2: SDDM
note: stopped Distro: Garuda Linux base: Arch Linux
Machine:
Type: Laptop System: LENOVO product: 81YK v: IdeaPad 5 15IIL05
serial: <superuser required> Chassis: type: 10 v: IdeaPad 5 15IIL05
serial: <superuser required>
Mobo: LENOVO model: LNVNB161216 v: SDK0J40709 WIN
serial: <superuser required> UEFI-[Legacy]: LENOVO v: DPCN53WW
date: 06/15/2021
Battery:
ID-1: BAT0 charge: 41.1 Wh (98.3%) condition: 41.8/45.7 Wh (91.4%)
volts: 12.2 min: 11.1 model: Sunwoda L19D3PF3 type: Li-poly
serial: <filter> status: N/A cycles: 101
CPU:
Info: model: Intel Core i7-1065G7 bits: 64 type: MT MCP arch: Ice Lake
built: 2019-21 process: Intel 10nm family: 6 model-id: 0x7E (126)
stepping: 5 microcode: 0xB0
Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
L1: 320 KiB desc: d-4x48 KiB; i-4x32 KiB L2: 2 MiB desc: 4x512 KiB
L3: 8 MiB desc: 1x8 MiB
Speed (MHz): avg: 3049 high: 3894 min/max: 400/3900 scaling:
driver: intel_pstate governor: performance cores: 1: 2247 2: 3802 3: 2413
4: 3777 5: 2018 6: 2766 7: 3894 8: 3479 bogomips: 23961
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities:
Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2
mitigation: Enhanced IBRS, IBPB: conditional, RSB filling
Type: srbds mitigation: Microcode
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: Intel Iris Plus Graphics G7 vendor: Lenovo driver: i915 v: kernel
arch: Gen11 process: Intel 10nm built: 2019-21 ports: active: eDP-1
empty: DP-1,HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:8a52 class-ID: 0300
Device-2: Acer Integrated Camera type: USB driver: uvcvideo bus-ID: 3-5:4
chip-ID: 5986:212b class-ID: 0e02
Display: x11 server: X.Org v: 21.1.3 with: Xwayland v: 22.1.2
compositor: kwin_x11 driver: X: loaded: modesetting
alternate: fbdev,intel,vesa gpu: i915 display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
s-diag: 582mm (22.93")
Monitor-1: eDP-1 model: InfoVision Optronics/Kunshan 0x061f built: 2019
res: 1920x1080 hz: 60 dpi: 142 gamma: 1.2 size: 344x194mm (13.54x7.64")
diag: 395mm (15.5") ratio: 16:9 modes: 1920x1080
OpenGL: renderer: Mesa Intel Iris Plus Graphics (ICL GT2)
v: 4.6 Mesa 22.1.2 direct render: Yes
Audio:
Device-1: Intel Ice Lake-LP Smart Sound Audio vendor: Lenovo
driver: sof-audio-pci-intel-icl
alternate: snd_hda_intel,snd_sof_pci_intel_icl bus-ID: 00:1f.3
chip-ID: 8086:34c8 class-ID: 0401
Sound Server-1: ALSA v: k5.18.6-zen1-1-zen running: yes
Sound Server-2: PulseAudio v: 16.1 running: no
Sound Server-3: PipeWire v: 0.3.52 running: yes
Network:
Device-1: Intel Ice Lake-LP PCH CNVi WiFi driver: iwlwifi v: kernel
bus-ID: 00:14.3 chip-ID: 8086:34f0 class-ID: 0280
IF: wlp0s20f3 state: up mac: <filter>
Bluetooth:
Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8
bus-ID: 3-10:6 chip-ID: 8087:0026 class-ID: e001
Report: bt-adapter ID: hci0 rfk-id: 3 state: down
bt-service: enabled,running rfk-block: hardware: no software: yes
address: <filter>
Drives:
Local Storage: total: 476.94 GiB used: 186.08 GiB (39.0%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: SK Hynix
model: HFM512GDHTNI-87A0B size: 476.94 GiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
rev: 11010C00 temp: 48.9 C scheme: MBR
Partition:
ID-1: / raw-size: 476.93 GiB size: 476.93 GiB (100.00%)
used: 186.08 GiB (39.0%) fs: btrfs dev: /dev/nvme0n1p1 maj-min: 259:1
ID-2: /home raw-size: 476.93 GiB size: 476.93 GiB (100.00%)
used: 186.08 GiB (39.0%) fs: btrfs dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /var/log raw-size: 476.93 GiB size: 476.93 GiB (100.00%)
used: 186.08 GiB (39.0%) fs: btrfs dev: /dev/nvme0n1p1 maj-min: 259:1
ID-4: /var/tmp raw-size: 476.93 GiB size: 476.93 GiB (100.00%)
used: 186.08 GiB (39.0%) fs: btrfs dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 11.38 GiB used: 4.5 MiB (0.0%)
priority: 100 dev: /dev/zram0
Sensors:
System Temperatures: cpu: 63.0 C mobo: N/A
Fan Speeds (RPM): N/A
Info:
Processes: 297 Uptime: 4h 40m wakeups: 121 Memory: 11.38 GiB
used: 5.45 GiB (47.9%) Init: systemd v: 251 default: graphical
tool: systemctl Compilers: gcc: 12.1.0 clang: 13.0.1 Packages: pacman: 1892
lib: 544 Shell: fish v: 3.4.1 default: Bash v: 5.1.16 running-in: konsole
inxi: 3.3.18
Garuda (2.6.4-1):
System install date: 2022-05-09
Last full system update: 2022-06-23
Is partially upgraded: No
Relevant software: NetworkManager
Windows dual boot: <superuser required>
Snapshots: Snapper
Failed units: