unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Alexandros Theodotou <alex@zrythm.org>
To: 38163@debbugs.gnu.org
Subject: bug#38163: GDK does not return the monitor's refresh rate
Date: Sun, 10 Nov 2019 16:44:23 +0000	[thread overview]
Message-ID: <c2840c44eff9757d09a0429ceb7676b23cad322d.camel@zrythm.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]

I have been developing and testing my GTK app (Zrythm) on many distros
and Guix is the only case that the monitor's refresh rate is returned
as 0.

The API I am using is this:
https://developer.gnome.org/gdk3/stable/GdkMonitor.html#gdk-monitor-get-refresh-rate

I was developing/testing on Parabola GNU/Linux-libre before and it was
giving me a correct rate of 60 Hz.

Other distros I have tested this API before on:
Various ubuntu versions, debian 9 and 10, manjaro (arch), various
fedora versions, plus a few others that users tested on.

I suspect GDK is trying to access something that guix doesn't make
available to it, but I don't have much knowledge of the internals of
GDK or Guix to debug this myself.

I will post a package from my guix channel that you can test this on
soon.

To call the API, one basically calls the following, after including
<gtk/gtk.h>, so any GTK program will do.
```
GdkDisplay * display = gdk_display_get_default ();
GdkMonitor * monitor = gdk_display_get_primary_monitor (display);
int refresh_rate = gdk_monitor_get_refresh_rate (monitor);
```

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2019-11-10 16:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-10 16:44 Alexandros Theodotou [this message]
2019-11-11 20:53 ` bug#38163: GDK does not return the monitor's refresh rate Ludovic Courtès
2019-11-11 21:31   ` Alexandros Theodotou
2019-11-13 20:56     ` Bengt Richter
2019-11-14 21:00       ` Ludovic Courtès
2019-11-15 18:24     ` Marius Bakke
2019-11-16 15:07       ` Ludovic Courtès
2020-05-27  0:10 ` Alexandros Theodotou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c2840c44eff9757d09a0429ceb7676b23cad322d.camel@zrythm.org \
    --to=alex@zrythm.org \
    --cc=38163@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).