Comments (3)
Sorry for the period of inactivity, I found out this was an issue fixed with GTK4.12: https://gitlab.gnome.org/GNOME/gtk/-/issues/5877, so it was a bug. This will be fixed when the binary builder jll package mousetrap depends on is updated.
from mousetrap.jl.
Hi, I think this is fixable but I need to research how to make the back-end aware of the monitor scale. I'll ask my GNOME contacts, which may take a few days, and get back to you.
Until then, could you run
begin
using Mousetrap
gtk4 = Mousetrap.detail.GTK4_jll.libgtk4
gio = Mousetrap.detail.Glib_jll.libgio
widget = Separator()
widget_ptr = Mousetrap.as_gobject_pointer(widget)
gtk_display = @ccall gtk4.gtk_widget_get_display(widget_ptr::Ptr{Cvoid})::Ptr{Cvoid}
gtk_monitor_list = @ccall gtk4.gdk_display_get_monitors(gtk_display::Ptr{Cvoid})::Ptr{Cvoid}
gtk_monitor = @ccall gio.g_list_model_get_item(gtk_monitor_list::Ptr{Cvoid}, 0::Int)::Ptr{Cvoid}
println("Monitor Scale: ", @ccall gtk4.gdk_monitor_get_scale_factor(gtk_monitor::Ptr{Cvoid})::Int)
end
in the REPL and tell me what it prints?
from mousetrap.jl.
Hi, thanks for your quick answer.
running your code get the following error (on both my surface and my desktop computer):
ERROR: UndefVarError: as_gobject_pointer not defined
Stacktrace:
[1] getproperty(x::Module, f::Symbol)
@ Base .\Base.jl:31
[2] top-level scope
@ .\REPL[2]:7
from mousetrap.jl.
Related Issues (20)
- Installation precompilation issue HOT 1
- Buttons not appearing HOT 2
- RenderArea disabled. HOT 1
- Unable to download artifact `iso_codes` HOT 4
- Is there a way to influence where new windows are created? HOT 5
- retina_scaling_factor not defined
- function get_revealed missing HOT 1
- Animation longer than 10^7 seconds gives very inaccurate timestep value HOT 2
- Example code is not tested or run HOT 3
- Setting a .jpg as texture segfaults HOT 3
- Outdated packages, Test error and example error HOT 3
- Documented default scaling not implemented
- AssertionError: Object of type AspectFrame does not fullfill the widget interface HOT 3
- Gtk4LayerShell HOT 1
- Critical Error - Open GL component is disabled. HOT 5
- Test error
- Hide on close for windows is broken ? HOT 1
- interacting with dropdowns spills a lot of gtk-criticals in the console HOT 2
- Incorrect ColumnView setting function name
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mousetrap.jl.