https://bugs.kde.org/show_bug.cgi?id=452494

--- Comment #2 from Marcus Gursch <marcus.gur...@gmail.com> ---
After having a more thorough look at kwin's and gtk's code I agree that if
anythink, this is a bug in gtk rather than kwin. Though from my experience it
is unlikely gtk folks will accept a change like that. They used their custom
protocol for 10 years now and it works in their own ecosystem.. 

To solve this issue for now I patched gtk3 and to make their default frame
clock implementation match my display refresh rate and it works well for my
usecase. Posting here for anyone else facing this issue:


```
diff --git a/gdk/gdkframeclock.c b/gdk/gdkframeclock.c
index 6f5e9cc..899dc7e 100644
--- a/gdk/gdkframeclock.c
+++ b/gdk/gdkframeclock.c
@@ -546,7 +546,7 @@ _gdk_frame_clock_debug_print_timings (GdkFrameClock  
*clock,
 }
 #endif /* G_ENABLE_DEBUG */

-#define DEFAULT_REFRESH_INTERVAL 16667 /* 16.7ms (1/60th second) */
+#define DEFAULT_REFRESH_INTERVAL 6061 /* 6.1ms (1/165th second) */
 #define MAX_HISTORY_AGE 150000         /* 150ms */

 /**
diff --git a/gdk/gdkframeclockidle.c b/gdk/gdkframeclockidle.c
index 89f5823..ff203d0 100644
--- a/gdk/gdkframeclockidle.c
+++ b/gdk/gdkframeclockidle.c
@@ -34,7 +34,7 @@
 #include <windows.h>
 #endif

-#define FRAME_INTERVAL 16667 /* microseconds */
+#define FRAME_INTERVAL 6061 /* microseconds */

 typedef enum {
   SMOOTH_PHASE_STATE_VALID = 0,    /* explicit, since we count on zero-init */
```

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to