1
0
mirror of https://github.com/moparisthebest/FireTray synced 2024-08-13 15:53:47 -04:00

Merge branch 'ff17-missing-unmap'

This commit is contained in:
foudfou 2012-09-05 13:54:29 +02:00
commit 78dc65c77e
3 changed files with 11 additions and 6 deletions

View File

@ -248,6 +248,10 @@ function gdk_defines(lib) {
ctypes.default_abi, this.GdkFilterReturn,
[this.GdkXEvent.ptr, this.GdkEvent.ptr, gobject.gpointer]).ptr;
lib.lazy_bind("gdk_flush", ctypes.void_t);
lib.lazy_bind("gdk_error_trap_push", ctypes.void_t);
lib.lazy_bind("gdk_error_trap_pop", gobject.gint);
lib.lazy_bind("gdk_x11_drawable_get_xid", x11.XID, this.GdkDrawable.ptr);
lib.lazy_bind("gdk_window_new", this.GdkWindow.ptr, this.GdkWindow.ptr, this.GdkWindowAttributes.ptr, gobject.gint);
lib.lazy_bind("gdk_window_destroy", ctypes.void_t, this.GdkWindow.ptr);
@ -298,6 +302,7 @@ function gdk_defines(lib) {
lib.lazy_bind("gdk_window_get_user_data", ctypes.void_t, this.GdkWindow.ptr, gobject.gpointer.ptr);
lib.lazy_bind("gdk_atom_intern", this.GdkAtom, gobject.gchar.ptr, gobject.gboolean);
lib.lazy_bind("gdk_property_change", ctypes.void_t, this.GdkWindow.ptr, this.GdkAtom, this.GdkAtom, gobject.gint, this.GdkPropMode, gobject.guchar.ptr, gobject.gint);
lib.lazy_bind("gdk_window_get_effective_toplevel", this.GdkWindow.ptr, this.GdkWindow.ptr);
lib.lazy_bind("gdk_display_get_n_screens", gobject.gint, this.GdkDisplay.ptr);
lib.lazy_bind("gdk_display_get_screen", this.GdkScreen.ptr, this.GdkDisplay.ptr, gobject.gint);

View File

@ -120,6 +120,7 @@ function x11_defines(lib) {
this.StructureNotifyMask = 1<<17
this.SubstructureNotifyMask = 1<<19;
this.SubstructureRedirectMask = 1<<20;
this.FocusChangeMask = 1<<21
this.PropertyChangeMask = 1<<22
this.Bool = ctypes.int;

View File

@ -162,6 +162,7 @@ firetray.Window = {
getGdkWindowFromNativeHandle: function(nativeHandle) {
let gdkw = new gdk.GdkWindow.ptr(ctypes.UInt64(nativeHandle)); // a new pointer to the GdkWindow
gdkw = gdk.gdk_window_get_effective_toplevel(gdkw);
log.debug("gdkw="+gdkw+" *gdkw="+this.addrPointedByInHex(gdkw));
return gdkw;
},
@ -171,9 +172,6 @@ firetray.Window = {
gdk.gdk_window_get_user_data(gdkWin, gptr.address());
log.debug("gptr="+gptr+" *gptr="+this.addrPointedByInHex(gptr));
let gtkw = ctypes.cast(gptr, gtk.GtkWindow.ptr);
let gtkw_voidp = ctypes.cast(gtkw, ctypes.void_t.ptr);
let gtkwid_top = gtk.gtk_widget_get_toplevel(ctypes.cast(gtkw, gtk.GtkWidget.ptr));
gtkw = ctypes.cast(gtkwid_top, gtk.GtkWindow.ptr);
log.debug("gtkw="+gtkw+" *gtkw="+this.addrPointedByInHex(gtkw));
return gtkw;
},
@ -499,11 +497,11 @@ firetray.Window = {
let status = x11.XGetWindowAttributes(x11.current.Display, xid, xWindowAttributes.address());
log.debug("xWindowAttributes: "+xWindowAttributes);
let xEventMask = xWindowAttributes.your_event_mask;
let xEventMaskNeeded = x11.VisibilityChangeMask|x11.StructureNotifyMask|x11.PropertyChangeMask;
let xEventMaskNeeded = x11.VisibilityChangeMask|x11.StructureNotifyMask|
x11.FocusChangeMask|x11.PropertyChangeMask;
log.debug("xEventMask="+xEventMask+" xEventMaskNeeded="+xEventMaskNeeded);
if ((xEventMask & xEventMaskNeeded) !== xEventMaskNeeded) {
log.warn("missing mandatory event-masks");
// could try to subscribe here with XChangeWindowAttributes()
log.error("missing mandatory event-masks"); // change with gdk_window_set_events()
}
},
@ -540,6 +538,7 @@ firetray.Window = {
return gdk.GDK_FILTER_CONTINUE;
}
}; // firetray.Window