Skip to content

Instantly share code, notes, and snippets.

View ebassi's full-sized avatar

Emmanuele Bassi ebassi

View GitHub Profile
After a grab (either a clutter grab or an X grab involving windows overlapping
the stage), clutter can be confused about what actor contains the pointer.
For https://bugzilla.gnome.org/show_bug.cgi?id=630842, when we suspect that
clutter might be out of sync, we recover by posting a fake CLUTTER_MOTION
event, which as a side effect will result in clutter eventually calling
_clutter_input_device_update(). But it would be nicer to have a guaranteed way
of doing this.
At first I thought we could just make _clutter_device_manager_update_devices()

In Menu Bar 1 (constructed using Gio::Menu): How can one add tooltips? How can one give a CSS class or id to a widget?

  • Menus constructed with GMenu do not have tooltips; we find that tooltips are generally problematic in menu context due to how tooltips and menus are implemented using similar windowing system constructs that end up competing for event handling and stacking. Additionally, menus constructed with GMenu could be sent over some IPC mechanism, to other entities, like the compositor, which may or may not have the concept of "tooltip".
  • Menus constructed with GMenu do not have CSS style information. Like with tooltips, menus could be displayed by something that is not the application, which means style information is not transferrable.
@ebassi
ebassi / meson-junit-report.py
Created April 13, 2019 16:04
Meson to JUnit report conversion script
#!/usr/bin/env python3
#
# meson-junit-report.py: Turns a Meson test log into a JUnit report
#
# Copyright 2019 GNOME Foundation
#
# SPDX-License-Identifier: LGPL-2.1-or-later
import argparse
import datetime
@ebassi
ebassi / meson-html-report.py
Created April 13, 2019 16:05
Meson test log to HTML conversion script
#!/usr/bin/env python3
# meson-junit-report.py: Turns a Meson test log into an HTML report
#
# Copyright 2019 GNOME Foundation
#
# SPDX-License-Identifier: LGPL-2.1-or-later
import argparse
import datetime
@ebassi
ebassi / bool-size.c
Created July 26, 2020 17:45
Quick test for using C99's _Bool with GLib's gboolean
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <glib-object.h>
typedef unsigned char my_bool_t;
G_DECLARE_FINAL_TYPE (TestObject, test_object, TEST, OBJECT, GObject)
struct _TestObject