public inbox for
 help / color / mirror / Atom feed
From: Kevin Ryde <>
Subject: gdk-window-get-events returns all-events-mask
Date: Mon, 03 Mar 2003 23:07:00 -0000	[thread overview]
Message-ID: <> (raw)

I think gdk-window-get-events sometimes returns '(all-events-mask) no
matter what the actual mask is.  For instance, on a recent i386 debian
with a recent cvs guile,

	(use-modules (gtk gtk)
	             (gtk gdk))

	(define wid (gtk-window-new 'toplevel))
	(gtk-widget-realize wid)

	(define win (gtk-widget-window wid))

	(gdk-window-set-events win '(enter-notify-mask))
	(display (gdk-window-get-events win))

prints '(all-events-mask), where I hoped for '(enter-notify-mask)
perhaps plus structure-mask or others added by the window manager.

It looks like sgtk_enum_flags_init ended up sorting "all-events-mask"
to the start of the literals array, then sgtk_flags2scm thinks it
matches "val & info->literals[i].value".

I think this might happen only sometimes, since if I'm right
sgtk_flags_comp sorts based on the SCM pointer for the symbol, which
will make the order somewhat arbitrary.

Clearly, returning all-events-mask when it's not "all" is incorrect.
But I'd think it'd be better not to return it at all, instead return
the individual bits, so they can be subtracted from or whatever.

Perhaps all-events-mask could be tagged for use only by scm2flags, not

             reply	other threads:[~2003-03-03 23:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-03 23:07 Kevin Ryde [this message]
2003-03-16  9:07 ` Daniel Skarda
2003-03-16 21:57   ` Kevin Ryde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).