Skip to content

Incorrect window size returned if app is set to fullscreen #1594

@MonsieurBerthier

Description

@MonsieurBerthier

Description

getXSize() and getXSize() return incorrect values if the PRC configuration contains fullscreen true.

Steps to Reproduce

Here is the short piece of code to shown the problem:

import panda3d.core
import direct.showbase.ShowBase

prc_config = """
win-size 1920 1080
fullscreen true
"""

class Main(direct.showbase.ShowBase.ShowBase):

    def __init__(self):

        panda3d.core.loadPrcFileData("", prc_config)

        super().__init__(self)
        print((self.win.getXSize(), self.win.getYSize()))


main = Main()
main.run()

The code above prints (640, 480).
If fullscreen false the returned window size is correct.
Everything worked fine with 1.10.13.post1 and Python 3.11.

Environment

  • Operating system: Windows 11
  • System architecture: x86 64 bits
  • Panda3D version: 1.10.14
  • Installation method: pip
  • Python version: 3.12

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions