Skip to content

_sdl2.video.Window(maximized=True) not starting in fullscreen in Hyprland + Arch Linux #3177

Open
@blankRiot96

Description

@blankRiot96

Environment:

pygame-ce 2.5.1 (SDL 2.30.6, Python 3.12.5)
Platform:               Linux-6.10.8-arch1-1-x86_64-with-glibc2.40
System:                 Linux
System Version:         #1 SMP PREEMPT_DYNAMIC Wed, 04 Sep 2024 15:16:37 +0000
Processor:                      SSE2: Yes       AVX2: Yes      NEON: No
Architecture:           Bits: 64bit     Linkage: ELF

Python:                 CPython 3.12.5 (main, Aug  9 2024, 08:20:41) [GCC 14.2.1 20240805]
pygame version:         2.5.1
SDL versions:           Linked: 2.30.6  Compiled: 2.30.6
SDL Mixer versions:     Linked: 2.8.0   Compiled: 2.8.0
SDL Font versions:      Linked: 2.22.0  Compiled: 2.22.0
SDL Image versions:     Linked: 2.8.2   Compiled: 2.8.2
Freetype versions:      Linked: 2.13.2  Compiled: 2.13.2

Display Driver:         x11 ( xwayland == True )
Mixer Driver:           pulseaudio

Current behavior:
This is the code that works on other platforms, but not on Hyprland

import pygame
import pygame._sdl2.video

pygame.init()
win = pygame._sdl2.video.Window(resizable=True, maximized=True)
screen = win.get_surface()
pygame.print_debug_info()
clock = pygame.Clock()
while True:
    events = pygame.event.get()
    for event in events:
        if event.type == pygame.QUIT:
            raise SystemExit
    win.flip()

Expected behavior:
It was supposed to start the window in fullscreen, but instead its a tiny window
It works with the regular display API and pygame.FULLSCREEN flag

import pygame

pygame.init()
win = pygame.display.set_mode((500, 500), pygame.FULLSCREEN)
clock = pygame.Clock()
while True:
    events = pygame.event.get()
    for event in events:
        if event.type == pygame.QUIT:
            raise SystemExit
    win.fill("black")
    pygame.display.flip()

Steps to reproduce:

  1. Just run the snippet on Arch+Hyprland

Test code

import pygame
import pygame._sdl2.video

pygame.init()
win = pygame._sdl2.video.Window(resizable=True, maximized=True)
screen = win.get_surface()
pygame.print_debug_info()
clock = pygame.Clock()
while True:
    events = pygame.event.get()
    for event in events:
        if event.type == pygame.QUIT:
            raise SystemExit
    win.flip()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugNot working as intended

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions