mirror of
https://github.com/moparisthebest/FireTray
synced 2025-01-10 13:08:01 -05:00
activate window with gtk_window_present instead of
XSendClientMessgeEvent(_NET_ACTIVE_WINDOW)
This commit is contained in:
parent
56b0fe6332
commit
b47e960755
@ -116,6 +116,7 @@ function gtk_defines(lib) {
|
|||||||
lib.lazy_bind("gtk_window_stick", gobject.gint, this.GtkWindow.ptr);
|
lib.lazy_bind("gtk_window_stick", gobject.gint, this.GtkWindow.ptr);
|
||||||
lib.lazy_bind("gtk_window_maximize", gobject.gint, this.GtkWindow.ptr);
|
lib.lazy_bind("gtk_window_maximize", gobject.gint, this.GtkWindow.ptr);
|
||||||
lib.lazy_bind("gtk_window_fullscreen", gobject.gint, this.GtkWindow.ptr);
|
lib.lazy_bind("gtk_window_fullscreen", gobject.gint, this.GtkWindow.ptr);
|
||||||
|
lib.lazy_bind("gtk_window_present", ctypes.void_t, this.GtkWindow.ptr);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,21 +344,13 @@ firetray.Window = {
|
|||||||
// always returns 1 (BadRequest as a coincidence)
|
// always returns 1 (BadRequest as a coincidence)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* raises window on top and give focus.
|
* raises window on top and give focus.
|
||||||
*/
|
*/
|
||||||
activate: function(xid) {
|
activate: function(xid) {
|
||||||
if (!firetray.Utils.prefService.getBoolPref('show_activates'))
|
if (!firetray.Utils.prefService.getBoolPref('show_activates'))
|
||||||
return;
|
return;
|
||||||
|
gtk.gtk_window_present(firetray.Handler.gtkWindows.get(xid));
|
||||||
let dataSize = 3;
|
|
||||||
let data = ctypes.long(dataSize);
|
|
||||||
data[0] = 1; // source indication (0=none, 1=app, 2=pager)
|
|
||||||
data[1] = 0; // timestamp
|
|
||||||
data[2] = 0; // requestor's currently active window, 0 if none
|
|
||||||
this.xSendClientMessgeEvent(xid, x11.current.Atoms._NET_ACTIVE_WINDOW, data, dataSize);
|
|
||||||
|
|
||||||
LOG("window raised");
|
LOG("window raised");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user