mirror of
https://github.com/zotero/zotero.git
synced 2026-09-28 01:31:40 +00:00
fx140: Fix ctypes imports in utilities_internal.js
This commit is contained in:
parent
a9df0424e5
commit
4f8a1bc968
1 changed files with 5 additions and 5 deletions
|
|
@ -2666,7 +2666,7 @@ Zotero.Utilities.Internal.activate = new function () {
|
|||
* Find an X11 window given a name
|
||||
*/
|
||||
function _X11FindWindow(w, searchName) {
|
||||
ChromeUtils.importESModule("resource://gre/modules/ctypes.sys.mjs");
|
||||
const { ctypes } = ChromeUtils.importESModule("resource://gre/modules/ctypes.sys.mjs");
|
||||
|
||||
var res = _X11GetProperty(w, "_NET_CLIENT_LIST", 33 /** XA_WINDOW **/)
|
||||
|| _X11GetProperty(w, "_WIN_CLIENT_LIST", 6 /** XA_CARDINAL **/);
|
||||
|
|
@ -2696,7 +2696,7 @@ Zotero.Utilities.Internal.activate = new function () {
|
|||
* Get a property from an X11 window
|
||||
*/
|
||||
function _X11GetProperty(win, propertyName, propertyType) {
|
||||
ChromeUtils.importESModule("resource://gre/modules/ctypes.sys.mjs");
|
||||
const { ctypes } = ChromeUtils.importESModule("resource://gre/modules/ctypes.sys.mjs");
|
||||
|
||||
var returnType = new X11Atom(),
|
||||
returnFormat = new ctypes.int(),
|
||||
|
|
@ -2723,7 +2723,7 @@ Zotero.Utilities.Internal.activate = new function () {
|
|||
}
|
||||
if (Zotero.isMac) {
|
||||
if (win) {
|
||||
ChromeUtils.importESModule("resource://gre/modules/ctypes.sys.mjs");
|
||||
const { ctypes } = ChromeUtils.importESModule("resource://gre/modules/ctypes.sys.mjs");
|
||||
win.focus();
|
||||
|
||||
if (!_carbon) {
|
||||
|
|
@ -2771,7 +2771,7 @@ Zotero.Utilities.Internal.activate = new function () {
|
|||
}
|
||||
}
|
||||
else if (Zotero.isLinux && !isWayland && win) {
|
||||
ChromeUtils.importESModule("resource://gre/modules/ctypes.sys.mjs");
|
||||
const { ctypes } = ChromeUtils.importESModule("resource://gre/modules/ctypes.sys.mjs");
|
||||
|
||||
if (_x11 === false) return;
|
||||
if (!_x11) {
|
||||
|
|
@ -3021,7 +3021,7 @@ Zotero.Utilities.Internal.Environment = {
|
|||
* Since nsIEnvironment doesn't have an unset method
|
||||
*/
|
||||
unset: function (varName) {
|
||||
ChromeUtils.importESModule("resource://gre/modules/ctypes.sys.mjs");
|
||||
const { ctypes } = ChromeUtils.importESModule("resource://gre/modules/ctypes.sys.mjs");
|
||||
|
||||
let lib;
|
||||
let result;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue