mirror of
https://github.com/moparisthebest/FireTray
synced 2024-11-10 11:05:07 -05:00
option for ensuring windows are restored on top
This commit is contained in:
parent
74f7f263d1
commit
2a313d907a
@ -23,6 +23,7 @@
|
|||||||
<preference id="pref_bool_hides_on_minimize" name="extensions.firetray.hides_on_minimize" type="bool"/>
|
<preference id="pref_bool_hides_on_minimize" name="extensions.firetray.hides_on_minimize" type="bool"/>
|
||||||
<preference id="pref_bool_hides_single_window" name="extensions.firetray.hides_single_window" type="bool"/>
|
<preference id="pref_bool_hides_single_window" name="extensions.firetray.hides_single_window" type="bool"/>
|
||||||
<preference id="pref_bool_start_hidden" name="extensions.firetray.start_hidden" type="bool"/>
|
<preference id="pref_bool_start_hidden" name="extensions.firetray.start_hidden" type="bool"/>
|
||||||
|
<preference id="pref_bool_show_raised" name="extensions.firetray.show_raised" type="bool"/>
|
||||||
<preference id="pref_bool_show_icon_on_hide" name="extensions.firetray.show_icon_on_hide" type="bool"/>
|
<preference id="pref_bool_show_icon_on_hide" name="extensions.firetray.show_icon_on_hide" type="bool"/>
|
||||||
<preference id="pref_bool_scroll_hides" name="extensions.firetray.scroll_hides" type="bool" />
|
<preference id="pref_bool_scroll_hides" name="extensions.firetray.scroll_hides" type="bool" />
|
||||||
<preference id="pref_string_scroll_mode" name="extensions.firetray.scroll_mode" type="string" />
|
<preference id="pref_string_scroll_mode" name="extensions.firetray.scroll_mode" type="string" />
|
||||||
@ -58,6 +59,10 @@
|
|||||||
<checkbox id="ui_start_hidden" preference="pref_bool_start_hidden"
|
<checkbox id="ui_start_hidden" preference="pref_bool_start_hidden"
|
||||||
label="&bool_start_hidden.label;"
|
label="&bool_start_hidden.label;"
|
||||||
accesskey="&bool_start_hidden.accesskey;"/>
|
accesskey="&bool_start_hidden.accesskey;"/>
|
||||||
|
<checkbox id="ui_show_raised" preference="pref_bool_show_raised"
|
||||||
|
label="&bool_show_raised.label;"
|
||||||
|
accesskey="&bool_show_raised.accesskey;"
|
||||||
|
tooltiptext="&bool_show_raised.tooltip;"/>
|
||||||
</groupbox>
|
</groupbox>
|
||||||
|
|
||||||
<groupbox>
|
<groupbox>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!ENTITY prefwindow.title "FireTray preferences">
|
<!ENTITY prefwindow.title "y preferences">
|
||||||
<!ENTITY pane1.title "FireTray preferences">
|
<!ENTITY pane1.title "FireTray preferences">
|
||||||
|
|
||||||
<!ENTITY NOT_IMPLEMENTED_YET "NOT IMPLEMENTED YET">
|
<!ENTITY NOT_IMPLEMENTED_YET "NOT IMPLEMENTED YET">
|
||||||
@ -16,6 +16,9 @@
|
|||||||
<!ENTITY bool_hides_single_window.accesskey "H">
|
<!ENTITY bool_hides_single_window.accesskey "H">
|
||||||
<!ENTITY bool_start_hidden.label "Start application hidden to tray">
|
<!ENTITY bool_start_hidden.label "Start application hidden to tray">
|
||||||
<!ENTITY bool_start_hidden.accesskey "S">
|
<!ENTITY bool_start_hidden.accesskey "S">
|
||||||
|
<!ENTITY bool_show_raised.label "Ensure windows are restored on top">
|
||||||
|
<!ENTITY bool_show_raised.accesskey "E">
|
||||||
|
<!ENTITY bool_show_raised.tooltip "otherwise let the window manager handle it">
|
||||||
|
|
||||||
<!ENTITY icon_settings "Icon settings">
|
<!ENTITY icon_settings "Icon settings">
|
||||||
<!ENTITY bool_show_icon_on_hide.label "Show tray icon only if a window is hidden">
|
<!ENTITY bool_show_icon_on_hide.label "Show tray icon only if a window is hidden">
|
||||||
|
@ -11,6 +11,8 @@ pref("extensions.firetray.hides_on_close", true);
|
|||||||
pref("extensions.firetray.hides_on_minimize", true);
|
pref("extensions.firetray.hides_on_minimize", true);
|
||||||
pref("extensions.firetray.hides_single_window", false);
|
pref("extensions.firetray.hides_single_window", false);
|
||||||
pref("extensions.firetray.start_hidden", false);
|
pref("extensions.firetray.start_hidden", false);
|
||||||
|
pref("extensions.firetray.show_raised", false);
|
||||||
|
|
||||||
pref("extensions.firetray.show_icon_on_hide", false);
|
pref("extensions.firetray.show_icon_on_hide", false);
|
||||||
pref("extensions.firetray.scroll_hides", true);
|
pref("extensions.firetray.scroll_hides", true);
|
||||||
pref("extensions.firetray.scroll_mode", "down_hides");
|
pref("extensions.firetray.scroll_mode", "down_hides");
|
||||||
|
@ -248,6 +248,7 @@ function gdk_defines(lib) {
|
|||||||
lib.lazy_bind("gdk_drawable_get_size", ctypes.void_t, this.GdkDrawable.ptr, gobject.gint.ptr, gobject.gint.ptr);
|
lib.lazy_bind("gdk_drawable_get_size", ctypes.void_t, this.GdkDrawable.ptr, gobject.gint.ptr, gobject.gint.ptr);
|
||||||
// lib.lazy_bind("gdk_window_get_geometry", ctypes.void_t, this.GdkWindow.ptr, gobject.gint.ptr, gobject.gint.ptr, gobject.gint.ptr, gobject.gint.ptr, gobject.gint.ptr);
|
// lib.lazy_bind("gdk_window_get_geometry", ctypes.void_t, this.GdkWindow.ptr, gobject.gint.ptr, gobject.gint.ptr, gobject.gint.ptr, gobject.gint.ptr, gobject.gint.ptr);
|
||||||
lib.lazy_bind("gdk_window_move_resize", ctypes.void_t, this.GdkWindow.ptr, gobject.gint, gobject.gint, gobject.gint, gobject.gint);
|
lib.lazy_bind("gdk_window_move_resize", ctypes.void_t, this.GdkWindow.ptr, gobject.gint, gobject.gint, gobject.gint, gobject.gint);
|
||||||
|
lib.lazy_bind("gdk_window_raise", ctypes.void_t, this.GdkWindow.ptr);
|
||||||
lib.lazy_bind("gdk_atom_intern", this.GdkAtom, gobject.gchar.ptr, gobject.gboolean);
|
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_property_change", ctypes.void_t, this.GdkWindow.ptr, this.GdkAtom, this.GdkAtom, gobject.gint, this.GdkPropMode, gobject.guchar.ptr, gobject.gint);
|
||||||
|
|
||||||
|
@ -263,19 +263,12 @@ firetray.Window = {
|
|||||||
delete firetray.Handler.windows[xid].savedDesktop;
|
delete firetray.Handler.windows[xid].savedDesktop;
|
||||||
},
|
},
|
||||||
|
|
||||||
/* KEPT FOR LATER USE
|
ensureRaised: function(xid) {
|
||||||
onWindowState: function(gtkWidget, gdkEventState, userData) {
|
if (!firetray.Utils.prefService.getBoolPref('show_raised'));
|
||||||
LOG("window-state-event: "+gdkEventState.contents.new_window_state);
|
return;
|
||||||
|
let gdkWin = firetray.Handler.gdkWindows.get(xid);
|
||||||
if (gdkEventState.contents.new_window_state & gdk.GDK_WINDOW_STATE_ICONIFIED) {
|
gdk.gdk_window_raise(gdkWin);
|
||||||
let xid = firetray.Window.getXIDFromGtkWidget(gtkWidget);
|
|
||||||
LOG(xid+" iconified: "+gdkEventState.contents.changed_mask+" "+gdkEventState.contents.new_window_state);
|
|
||||||
}
|
|
||||||
|
|
||||||
let stopPropagation = true; // not usefull
|
|
||||||
return stopPropagation;
|
|
||||||
},
|
},
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* YOU MUST x11.XFree() THE VARIABLE RETURNED BY THIS FUNCTION
|
* YOU MUST x11.XFree() THE VARIABLE RETURNED BY THIS FUNCTION
|
||||||
@ -303,7 +296,7 @@ firetray.Window = {
|
|||||||
return [null, null];
|
return [null, null];
|
||||||
}
|
}
|
||||||
if (strEquals(actual_type.value, x11.None)) {
|
if (strEquals(actual_type.value, x11.None)) {
|
||||||
WARN("property not found");
|
LOG("property not found");
|
||||||
return [null, null];
|
return [null, null];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -315,7 +308,6 @@ firetray.Window = {
|
|||||||
ERROR("unsupported format: "+actual_format.value);
|
ERROR("unsupported format: "+actual_format.value);
|
||||||
}
|
}
|
||||||
LOG("format OK");
|
LOG("format OK");
|
||||||
// FIXME: how about https://developer.mozilla.org/en/JavaScript_typed_arrays
|
|
||||||
var props = ctypes.cast(prop_value, ctypes.unsigned_long.array(nitems.value).ptr);
|
var props = ctypes.cast(prop_value, ctypes.unsigned_long.array(nitems.value).ptr);
|
||||||
LOG("props="+props+", size="+props.constructor.size);
|
LOG("props="+props+", size="+props.constructor.size);
|
||||||
|
|
||||||
@ -495,6 +487,7 @@ firetray.Handler.showSingleWindow = function(xid) {
|
|||||||
firetray.Window.restoreWindowStates(xid);
|
firetray.Window.restoreWindowStates(xid);
|
||||||
firetray.Handler.windows[xid].baseWin.visibility = true; // show
|
firetray.Handler.windows[xid].baseWin.visibility = true; // show
|
||||||
firetray.Window.restoreWindowDesktop(xid); // after show
|
firetray.Window.restoreWindowDesktop(xid); // after show
|
||||||
|
firetray.Window.ensureRaised(xid);
|
||||||
// TODO: we need want to restore to the original monitor (screen)
|
// TODO: we need want to restore to the original monitor (screen)
|
||||||
|
|
||||||
firetray.Handler.windows[xid].visibility = true;
|
firetray.Handler.windows[xid].visibility = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user