Skip to content

backends/native: Release virtual buttons on dispose instead of finalize

GObject recommends to break references to other objects on dispose instead of finalize, also we want to release the pressed virtual buttons as early as possible if we know the object is getting destroyed.

So release the pressed buttons and unref our virtual MetaInputDeviceNative when the dispose vfunc is called, which also allows us to release the buttons immediately from javascript instead of waiting for the garbage collector by calling run_dispose() on the object.

Merge request reports