Giter Site home page Giter Site logo

Add support for HiDPI screens about cage HOT 12 CLOSED

Hjdskes avatar Hjdskes commented on September 25, 2024
Add support for HiDPI screens

from cage.

Comments (12)

Hjdskes avatar Hjdskes commented on September 25, 2024

Adding a help wanted label because I do not have the hardware to test (and therefore implement) this.

from cage.

ddevault avatar ddevault commented on September 25, 2024

You can test this even without a hidpi screen - just run the parent compositor with scale=2 and live with the obnoxiously large UI for a bit. You can run wio in a hidpi window under the wayland backend like this:

 ./wio -o WL-1:-1:-1:-1:-1:2

from cage.

Hjdskes avatar Hjdskes commented on September 25, 2024

I think we have most bits in place for this now, but I still don't have the hardware to test. I might give Drew's suggestion a try if no-one else can test this on actual hardware.

from cage.

ericonr avatar ericonr commented on September 25, 2024

I can try it out on a 4K TV, do you think that would work?

from cage.

Hjdskes avatar Hjdskes commented on September 25, 2024

Only if that device is actually HiDPI. Usually, HiDPI outputs are screens with a high resolution in a relatively small physical size.

from cage.

ericonr avatar ericonr commented on September 25, 2024

Is it supposed to automatically detect that the output is such a device? If not, I could test the actual scaling itself, as @ddevault mentioned.

from cage.

Hjdskes avatar Hjdskes commented on September 25, 2024

It won't auto detect that, no. If you can run it with scaling that'd be awesome!

from cage.

ericonr avatar ericonr commented on September 25, 2024

https://imgur.com/a/KPbvml7 so here are the tests I made. Not sure if the issue where my prompt vanished is relevant to cage's usecase (it usually shouldn't lose focus during normal use).

There was also this weird black bar at the bottom, but I'm not entirely sure what caused it.

Is there any way I can run cage directly to try out the scaling? Or does it only work inside another compositor for now?

from cage.

ericonr avatar ericonr commented on September 25, 2024

@Hjdskes sorry for the delay! There is also some weird fringing going on with the pointer, but that doesn't depend on the scale.

Qutebrowser doesn't have the black bar at the bottom, nor the content changes when I focus or unfocus cage, so it might have been weird interaction with alacritty.

Overall I'd say it works. If you haven't implemented a way to directly tell cage the scale (specially when launching standalone), I could give it a try. Perhaps a command line option?

from cage.

Hjdskes avatar Hjdskes commented on September 25, 2024

Thanks @ericonr!

Is there any way I can run cage directly to try out the scaling? Or does it only work inside another compositor for now?

Currently Cage doesn't directly support this, so you'll have to test it inside another compositor for now. I can look into adding this to Cage, although ideally this would come through the implementation of an output management protocol.

I don't think Alacritty is the best test case. Not only does it seem to have a number of issues, it also doesn't have many UI elements to verify the scaling is working properly. Running a GTK3 application for example would be more indicative of a proper scaling implementation.

from cage.

ericonr avatar ericonr commented on September 25, 2024

@Hjdskes

I can look into adding this to Cage, although ideally this would come through the implementation of an output management protocol.

It's not a feature I need, so no worries! An output management protocol makes much more sense too.

I don't think Alacritty is the best test case. Not only does it seem to have a number of issues, it also doesn't have many UI elements to verify the scaling is working properly. Running a GTK3 application for example would be more indicative of a proper scaling implementation.

And damn, sorry. I had tested it out with qutebrowser (through QtWayland) as well! Which had looked fine, btw.

I can probably look into this in a few days, I will let you know. I can try both Firefox and qutebrowser for GTK and Qt examples!

from cage.

Hjdskes avatar Hjdskes commented on September 25, 2024

The recent scene graph work and #213 should enable everything we need here.

from cage.

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.