Coder Social home page Coder Social logo

Comments (6)

elmindreda avatar elmindreda commented on May 25, 2024

This may be a bug in GLFW or Hyprland. Do you have libdecor installed? What is the output of wayland-info in that environment?

from glfw.

enesaltinkaya avatar enesaltinkaya commented on May 25, 2024

Hi, yes libdecor is installed.

[enes@redmi ~] $ pacman -Q libdecor
libdecor 0.2.2 -

I have kde-plasma installed right now besides hyprland, so i tried that, result was the same.

wayland-info hyprland, https://pastebin.com/rsVZNqvZ
wayland-info kde-plasma, https://pastebin.com/06M8vqWF

Also i printed out values from glfwGetFramebufferSize and glfwGetWindowSize like this;
Same output for kde-plasma and hyprland.

int windowWidth, windowHeight;
int frameBufferWidth, frameBufferHeight;
while (!glfwWindowShouldClose(window)) {
  ... 
  glfwGetFramebufferSize(window, &frameBufferWidth, &frameBufferHeight);
  glfwGetWindowSize(window, &windowWidth, &windowHeight);
  printf("fb:%d %d window:%d %d\n", frameBufferWidth, frameBufferHeight, windowWidth, windowHeight);
  ...
}

fb : 3840 2160 window : 1920 1080
fb : 3840 2160 window : 1920 1080
fb : 3840 2160 window : 1920 1080
fb : 3840 2160 window : 1920 1080
fb : 3840 2160 window : 1920 1080
fb : 3840 2160 window : 1920 1080
fb : 3840 2160 window : 1920 1080

And this output is from hyprctl clients when running on hyprland;
It says "size: 1920,1080" but it covers the whole screen :S

Window 57227fbf74a0 -> Ales:
	mapped: 1
	hidden: 0
	at: 0,0
	size: 1920,1080
	workspace: 3 (3)
	floating: 1
	monitor: 0
	class: 
	title: Ales
	initialClass: 
	initialTitle: Ales
	pid: 80209
	xwayland: 0
	pinned: 0
	fullscreen: 0
	fullscreenmode: 0
	fakefullscreen: 0
	grouped: 0
	swallowing: 0
	focusHistoryID: 2

from glfw.

elmindreda avatar elmindreda commented on May 25, 2024

Also i printed out values from glfwGetFramebufferSize and glfwGetWindowSize like this; Same output for kde-plasma and hyprland.

fb : 3840 2160 window : 1920 1080
fb : 3840 2160 window : 1920 1080
fb : 3840 2160 window : 1920 1080
fb : 3840 2160 window : 1920 1080
fb : 3840 2160 window : 1920 1080
fb : 3840 2160 window : 1920 1080
fb : 3840 2160 window : 1920 1080

And this output is from hyprctl clients when running on hyprland; It says "size: 1920,1080" but it covers the whole screen :S

Window 57227fbf74a0 -> Ales:
	size: 1920,1080

That does look like it's a bug in Hyprland. What does GLFW say the window content scale is?

from glfw.

enesaltinkaya avatar enesaltinkaya commented on May 25, 2024
  float windowScaleX, windowScaleY;
  float monitorScaleX, monitorScaleY;

  while (!glfwWindowShouldClose(window)) {
    ...
    glfwGetMonitorContentScale(glfwGetPrimaryMonitor(), &monitorScaleX, &monitorScaleY);
    glfwGetWindowContentScale(window, &windowScaleX, &windowScaleY);
    printf("monitorScale:%f %f windowScale:%f %f\n", monitorScaleX, monitorScaleY, windowScaleX, windowScaleY);
    ...
  }

monitorScale:2.000000 2.000000 windowScale:2.000000 2.000000
monitorScale:2.000000 2.000000 windowScale:2.000000 2.000000
monitorScale:2.000000 2.000000 windowScale:2.000000 2.000000
monitorScale:2.000000 2.000000 windowScale:2.000000 2.000000
monitorScale:2.000000 2.000000 windowScale:2.000000 2.000000

This looks correct.

from glfw.

elmindreda avatar elmindreda commented on May 25, 2024

Thank you! This looks to me very much like a compositor bug, in which case there's nothing GLFW can do or even any way to find out it's happening.

from glfw.

enesaltinkaya avatar enesaltinkaya commented on May 25, 2024

Alright. For now I'll compile glfw with only X11 support and work with Xwayland. Thanks.

from glfw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.