Signal.Handler: correct flag check (#233)

This commit is contained in:
Sergii Fesenko 2021-03-27 20:11:59 +02:00 committed by GitHub
parent a23d44fb82
commit 9be7e092a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -211,11 +211,10 @@ namespace GLib {
public Delegate Handler { public Delegate Handler {
get { get {
InvocationHint hint = (InvocationHint) Marshal.PtrToStructure (g_signal_get_invocation_hint (obj.Handle), typeof (InvocationHint)); var hint = (InvocationHint) Marshal.PtrToStructure (g_signal_get_invocation_hint (obj.Handle), typeof (InvocationHint));
if (hint.run_type == Flags.RunFirst) return hint.run_type.HasFlag(Flags.RunFirst)
return before_handler; ? before_handler
else : after_handler;
return after_handler;
} }
} }