XScreenSaver 6.05 out now

XScreenSaver 6.05 is out now.

This is an X11-only release. No new display modes this time, but I ported xscreensaver-settings from GTK 2 to GTK 3.

"Ported" is doing some heavy lifting there, since if you have even a passing familiarity with open source software you can easily predict that "port" means "largely rewrite".

It wasn't quite as ridiculous as the shit that Apple pulled between macOS and iOS, doing things like replacing NSColor with identical-yet-not UIColor, but it was close. No Linux developer has ever met a function that they don't believe should be deprecated after 5 years. They're like the pedobear of APIs: "Too old!"

Anyway, lemme know if it breaks.


Minor update: if you already downloaded 6.05.tar.gz, grab 6.05.1.tar.gz. Oops.

Previously, previously.

Tags: , , ,
Current Music: EMA -- Milkman ♬

Dali Clock 2.47 released

This version restores XScreenSaver support. Many Bothans died to bring you these frame buffers.

So here's how XScreenSaver support should work: when invoked with --root or --window-id, just render the GTK widget hierarchy onto an external X11 window, and let it run normally. The following should do that:

GtkWindow *win = ...self...;
GdkDisplay *gdpy = gdk_display_get_default();
GdkWindow *gw = gdk_x11_window_foreign_new_for_display (gdpy, xwin);
gtk_widget_set_has_window (win, TRUE);
gdk_window_set_user_data (gw, win);
g_signal_connect (win, "realize", G_CALLBACK (foreign_realize), gw);
// And in foreign_realize():
  gtk_widget_set_window (widget, GDK_WINDOW (user_data));

Spoiler alert, that doesn't work. I can find no evidence that creating a GtkWindow and GtkWidget hierarchy atop an existing X11 Window works at all. See the sample program in this comment for our best attempt.

So instead how it works is this:

  • Create a new EGL or GLX context on the existing X11 Window, that hopefully is close enough to the one that the GtkGLArea would have made;
  • Create, but do not ever realize, the GtkGLArea widget;
  • Manually run that widget's "render" method, and have it bind to our context instead of the context that the GtkGLArea would have created, had we allowed it to be born.

It's nasty, and it's a lot more code (because EGL is ridiculously verbose), but it works?

It's possible that GLX would work on all extant systems, avoiding the need for that EGL nonsense, but I'm not sure.

Also: I would love to see an example of any GTK program that has convinced the compositor to respect the window's alpha channel (meaning different parts of the window have different opacity, as opposed to giving the entire window a single alpha value.) Someone claimed it was possible but I have my doubts.

Previously.

Tags: , , , , , ,

  • Previously