Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
0221099e7e | |||
374caade47 | |||
a5937d1d6d | |||
e36ba874a8 | |||
22392d1328 | |||
0dee82fb9f | |||
68f00f397f | |||
905801b178 | |||
4a7082bb0f | |||
2e90c5fa4b | |||
50e849a186 | |||
e7f2e92410 | |||
b1b455ff1a | |||
ab4c72d758 | |||
86a520b880 | |||
4bf033a885 | |||
e3ebc8d0c6 | |||
fc5ab44704 |
16
NEWS
16
NEWS
@ -1,3 +1,19 @@
|
||||
3.29.4
|
||||
======
|
||||
* Fix "Clear All" for calendar events [Florian; #325]
|
||||
* Allow cancelling direct switch operations [Xavier; #315]
|
||||
* Support being started by systemd --user [Iain; !137, !138]
|
||||
* Support key event forwarding required by some input methods [Carlos; #275]
|
||||
* Misc. bug fixes and cleanups [Jasper, Andrea, Florian; #663461, #372, !112,
|
||||
#414, !151]
|
||||
|
||||
Contributors:
|
||||
Andrea Azzarone, Carlos Garnacho, Xavier Johnson, Iain Lane, Florian Müllner,
|
||||
Jasper St. Pierre
|
||||
|
||||
Translators:
|
||||
Stas Solovey [ru]
|
||||
|
||||
3.29.3
|
||||
======
|
||||
* Save creation time in screenshot metadata [Florian; #790481]
|
||||
|
5
data/gnome-shell-wayland.target
Normal file
5
data/gnome-shell-wayland.target
Normal file
@ -0,0 +1,5 @@
|
||||
[Unit]
|
||||
Description=GNOME Shell (wayland sync point)
|
||||
After=gnome-shell.service
|
||||
BindsTo=gnome-shell.service
|
||||
Conflicts=gnome-shell-x11.target
|
5
data/gnome-shell-x11.target
Normal file
5
data/gnome-shell-x11.target
Normal file
@ -0,0 +1,5 @@
|
||||
[Unit]
|
||||
Description=GNOME Shell (x11 sync point)
|
||||
After=gnome-shell.service
|
||||
BindsTo=gnome-shell.service
|
||||
Conflicts=gnome-shell-wayland.target
|
11
data/gnome-shell.service.in
Normal file
11
data/gnome-shell.service.in
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=GNOME Shell
|
||||
Wants=gnome-session.service
|
||||
After=graphical-session-pre.target gnome-session-bus.target
|
||||
PartOf=graphical-session.target
|
||||
|
||||
[Service]
|
||||
Type=dbus
|
||||
ExecStart=@bindir@/gnome-shell
|
||||
Restart=on-failure
|
||||
BusName=org.gnome.Shell
|
@ -93,6 +93,23 @@ schema = configure_file(
|
||||
install_dir: schemadir
|
||||
)
|
||||
|
||||
if have_systemd
|
||||
unitconf = configuration_data()
|
||||
unitconf.set('bindir', bindir)
|
||||
|
||||
unit = configure_file(
|
||||
input: 'gnome-shell.service.in',
|
||||
output: 'gnome-shell.service',
|
||||
configuration: unitconf,
|
||||
install_dir: systemduserunitdir
|
||||
)
|
||||
|
||||
units = files('gnome-shell-wayland.target',
|
||||
'gnome-shell-x11.target')
|
||||
|
||||
install_data(units, install_dir: systemduserunitdir)
|
||||
endif
|
||||
|
||||
# for unit tests - gnome.compile_schemas() only looks in srcdir
|
||||
custom_target('compile-schemas',
|
||||
input: schema,
|
||||
|
@ -350,16 +350,19 @@ var ShellUserVerifier = new Lang.Class({
|
||||
try {
|
||||
this._clearUserVerifier();
|
||||
this._userVerifier = client.open_reauthentication_channel_finish(result);
|
||||
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
|
||||
return;
|
||||
} catch(e if e.matches(Gio.DBusError, Gio.DBusError.ACCESS_DENIED) &&
|
||||
!this._reauthOnly) {
|
||||
// Gdm emits org.freedesktop.DBus.Error.AccessDenied when there is
|
||||
// no session to reauthenticate. Fall back to performing verification
|
||||
// from this login session
|
||||
client.get_user_verifier(this._cancellable, this._userVerifierGot.bind(this));
|
||||
return;
|
||||
} catch(e) {
|
||||
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
|
||||
return;
|
||||
if (e.matches(Gio.DBusError, Gio.DBusError.ACCESS_DENIED) &&
|
||||
!this._reauthOnly) {
|
||||
// Gdm emits org.freedesktop.DBus.Error.AccessDenied when there
|
||||
// is no session to reauthenticate. Fall back to performing
|
||||
// verification from this login session
|
||||
client.get_user_verifier(this._cancellable,
|
||||
this._userVerifierGot.bind(this));
|
||||
return;
|
||||
}
|
||||
|
||||
this._reportInitError('Failed to open reauthentication channel', e);
|
||||
return;
|
||||
}
|
||||
@ -374,9 +377,9 @@ var ShellUserVerifier = new Lang.Class({
|
||||
try {
|
||||
this._clearUserVerifier();
|
||||
this._userVerifier = client.get_user_verifier_finish(result);
|
||||
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
|
||||
return;
|
||||
} catch(e) {
|
||||
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
|
||||
return;
|
||||
this._reportInitError('Failed to obtain user verifier', e);
|
||||
return;
|
||||
}
|
||||
@ -434,9 +437,9 @@ var ShellUserVerifier = new Lang.Class({
|
||||
(obj, result) => {
|
||||
try {
|
||||
obj.call_begin_verification_for_user_finish(result);
|
||||
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
|
||||
return;
|
||||
} catch(e) {
|
||||
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
|
||||
return;
|
||||
this._reportInitError('Failed to start verification for user', e);
|
||||
return;
|
||||
}
|
||||
@ -449,9 +452,9 @@ var ShellUserVerifier = new Lang.Class({
|
||||
(obj, result) => {
|
||||
try {
|
||||
obj.call_begin_verification_finish(result);
|
||||
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
|
||||
return;
|
||||
} catch(e) {
|
||||
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
|
||||
return;
|
||||
this._reportInitError('Failed to start verification', e);
|
||||
return;
|
||||
}
|
||||
|
@ -115,6 +115,11 @@ var IBusManager = new Lang.Class({
|
||||
object_path: IBus.PATH_PANEL });
|
||||
this._candidatePopup.setPanelService(this._panelService);
|
||||
this._panelService.connect('update-property', this._updateProperty.bind(this));
|
||||
this._panelService.connect('set-cursor-location', (ps, x, y, w, h) => {
|
||||
let cursorLocation = { x, y, width: w, height: h };
|
||||
this.emit('set-cursor-location', cursorLocation);
|
||||
});
|
||||
|
||||
try {
|
||||
// IBus versions older than 1.5.10 have a bug which
|
||||
// causes spurious set-content-type emissions when
|
||||
|
@ -15,6 +15,8 @@ var InputMethod = new Lang.Class({
|
||||
this._purpose = 0;
|
||||
this._enabled = true;
|
||||
this._currentFocus = null;
|
||||
this._currentEvent = null;
|
||||
this._doForwardEvent = false;
|
||||
this._ibus = IBus.Bus.new_async();
|
||||
this._ibus.connect('connected', this._onConnected.bind(this));
|
||||
this._ibus.connect('disconnected', this._clear.bind(this));
|
||||
@ -25,6 +27,9 @@ var InputMethod = new Lang.Class({
|
||||
this._onSourceChanged.bind(this));
|
||||
this._currentSource = this._inputSourceManager.currentSource;
|
||||
|
||||
let deviceManager = Clutter.DeviceManager.get_default();
|
||||
this._virtualDevice = deviceManager.create_virtual_device(Clutter.InputDeviceType.KEYBOARD_DEVICE);
|
||||
|
||||
if (this._ibus.is_connected())
|
||||
this._onConnected();
|
||||
},
|
||||
@ -64,6 +69,7 @@ var InputMethod = new Lang.Class({
|
||||
this._context.connect('commit-text', this._onCommitText.bind(this));
|
||||
this._context.connect('delete-surrounding-text', this._onDeleteSurroundingText.bind(this));
|
||||
this._context.connect('update-preedit-text', this._onUpdatePreeditText.bind(this));
|
||||
this._context.connect('forward-key-event', this._onForwardKeyEvent.bind(this));
|
||||
|
||||
this._updateCapabilities();
|
||||
},
|
||||
@ -96,6 +102,24 @@ var InputMethod = new Lang.Class({
|
||||
this.set_preedit_text(str, pos);
|
||||
},
|
||||
|
||||
_onForwardKeyEvent(context, keyval, keycode, state) {
|
||||
let press = (state & IBus.ModifierType.RELEASE_MASK) == 0;
|
||||
|
||||
if (this._currentEvent) {
|
||||
// If we are handling this same event in filter_key_press(),
|
||||
// just let it go through, sending the same event again will
|
||||
// be silenced away because the key counts as pressed.
|
||||
if (this._currentEvent.get_key_symbol() == keyval &&
|
||||
(this._currentEvent.type() == Clutter.EventType.KEY_PRESS) == press) {
|
||||
this._doForwardEvent = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this._virtualDevice.notify_key(Clutter.get_current_event_time(), keycode,
|
||||
press ? Clutter.KeyState.PRESSED : Clutter.KeyState.RELEASED);
|
||||
},
|
||||
|
||||
vfunc_focus_in(focus) {
|
||||
this._currentFocus = focus;
|
||||
if (this._context) {
|
||||
@ -197,13 +221,23 @@ var InputMethod = new Lang.Class({
|
||||
|
||||
if (event.type() == Clutter.EventType.KEY_RELEASE)
|
||||
state |= IBus.ModifierType.RELEASE_MASK;
|
||||
|
||||
this._currentEvent = event;
|
||||
this._doForwardEvent = false;
|
||||
|
||||
this._context.process_key_event_async(event.get_key_symbol(),
|
||||
event.get_key_code() - 8, // Convert XKB keycodes to evcodes
|
||||
state, -1, null,
|
||||
(context, res) => {
|
||||
try {
|
||||
let retval = context.process_key_event_async_finish(res);
|
||||
|
||||
if (this._doForwardEvent)
|
||||
retval = false;
|
||||
|
||||
this.notify_key_event(event, retval);
|
||||
this._doForwardEvent = false;
|
||||
this._currentEvent = null;
|
||||
} catch (e) {
|
||||
log('Error processing key on IM: ' + e.message);
|
||||
}
|
||||
|
@ -40,14 +40,24 @@ const SystemdLoginSessionIface = '<node> \
|
||||
<signal name="Lock" /> \
|
||||
<signal name="Unlock" /> \
|
||||
<property name="Active" type="b" access="read" /> \
|
||||
<property name="Class" type="s" access="read" /> \
|
||||
<property name="Id" type="s" access="read" /> \
|
||||
<method name="SetLockedHint"> \
|
||||
<arg type="b" direction="in"/> \
|
||||
</method> \
|
||||
</interface> \
|
||||
</node>';
|
||||
|
||||
const SystemdLoginUserIface = '<node> \
|
||||
<interface name="org.freedesktop.login1.User"> \
|
||||
<property name="Display" type="(so)" access="read" /> \
|
||||
<property name="Sessions" type="a(so)" access="read" /> \
|
||||
</interface> \
|
||||
</node>';
|
||||
|
||||
const SystemdLoginManager = Gio.DBusProxy.makeProxyWrapper(SystemdLoginManagerIface);
|
||||
const SystemdLoginSession = Gio.DBusProxy.makeProxyWrapper(SystemdLoginSessionIface);
|
||||
const SystemdLoginUser = Gio.DBusProxy.makeProxyWrapper(SystemdLoginUserIface);
|
||||
|
||||
function haveSystemd() {
|
||||
return GLib.access("/run/systemd/seats", 0) >= 0;
|
||||
@ -109,6 +119,9 @@ var LoginManagerSystemd = new Lang.Class({
|
||||
this._proxy = new SystemdLoginManager(Gio.DBus.system,
|
||||
'org.freedesktop.login1',
|
||||
'/org/freedesktop/login1');
|
||||
this._userProxy = new SystemdLoginUser(Gio.DBus.system,
|
||||
'org.freedesktop.login1',
|
||||
'/org/freedesktop/login1/user/self');
|
||||
this._proxy.connectSignal('PrepareForSleep',
|
||||
this._prepareForSleep.bind(this));
|
||||
},
|
||||
@ -121,8 +134,31 @@ var LoginManagerSystemd = new Lang.Class({
|
||||
|
||||
let sessionId = GLib.getenv('XDG_SESSION_ID');
|
||||
if (!sessionId) {
|
||||
log('Unset XDG_SESSION_ID, getCurrentSessionProxy() called outside a user session.');
|
||||
return;
|
||||
log('Unset XDG_SESSION_ID, getCurrentSessionProxy() called outside a user session. Asking logind directly.');
|
||||
let [session, objectPath] = this._userProxy.Display;
|
||||
if (session) {
|
||||
log(`Will monitor session ${session}`);
|
||||
sessionId = session;
|
||||
} else {
|
||||
log('Failed to find "Display" session; are we the greeter?');
|
||||
|
||||
for (let [session, objectPath] of this._userProxy.Sessions) {
|
||||
let sessionProxy = new SystemdLoginSession(Gio.DBus.system,
|
||||
'org.freedesktop.login1',
|
||||
objectPath);
|
||||
log(`Considering ${session}, class=${sessionProxy.Class}`);
|
||||
if (sessionProxy.Class == 'greeter') {
|
||||
log(`Yes, will monitor session ${session}`);
|
||||
sessionId = session;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!sessionId) {
|
||||
log('No, failed to get session from logind.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this._proxy.GetSessionRemote(sessionId, (result, error) => {
|
||||
|
@ -821,6 +821,8 @@ var EventsSection = new Lang.Class({
|
||||
this._desktopSettings.connect('changed', this._reloadEvents.bind(this));
|
||||
this._eventSource = new EmptyEventSource();
|
||||
|
||||
this._messageById = new Map();
|
||||
|
||||
this.parent();
|
||||
|
||||
this._title = new St.Button({ style_class: 'events-section-title',
|
||||
@ -875,20 +877,32 @@ var EventsSection = new Lang.Class({
|
||||
|
||||
this._reloading = true;
|
||||
|
||||
this._list.destroy_all_children();
|
||||
|
||||
let periodBegin = _getBeginningOfDay(this._date);
|
||||
let periodEnd = _getEndOfDay(this._date);
|
||||
let events = this._eventSource.getEvents(periodBegin, periodEnd);
|
||||
|
||||
let ids = events.map(e => e.id);
|
||||
this._messageById.forEach((message, id) => {
|
||||
if (ids.includes(id))
|
||||
return;
|
||||
this._messageById.delete(id);
|
||||
this.removeMessage(message);
|
||||
});
|
||||
|
||||
for (let i = 0; i < events.length; i++) {
|
||||
let event = events[i];
|
||||
|
||||
let message = new EventMessage(event, this._date);
|
||||
message.connect('close', () => {
|
||||
this._ignoreEvent(event);
|
||||
});
|
||||
this.addMessage(message, false);
|
||||
let message = this._messageById.get(event.id);
|
||||
if (!message) {
|
||||
message = new EventMessage(event, this._date);
|
||||
message.connect('close', () => {
|
||||
this._ignoreEvent(event);
|
||||
});
|
||||
this._messageById.set(event.id, message);
|
||||
this.addMessage(message, false);
|
||||
} else {
|
||||
this.moveMessage(message, i, false);
|
||||
}
|
||||
}
|
||||
|
||||
this._reloading = false;
|
||||
|
@ -697,7 +697,14 @@ var EndSessionDialog = new Lang.Class({
|
||||
if (proxy.State == 'closing')
|
||||
continue;
|
||||
|
||||
if (proxy.Id == GLib.getenv('XDG_SESSION_ID'))
|
||||
let sessionId = GLib.getenv('XDG_SESSION_ID');
|
||||
if (!sessionId)
|
||||
this._loginManager.getCurrentSessionProxy(currentSessionProxy => {
|
||||
sessionId = currentSessionProxy.Id;
|
||||
log(`endSessionDialog: No XDG_SESSION_ID, fetched from logind: ${sessionId}`);
|
||||
});
|
||||
|
||||
if (proxy.Id == sessionId)
|
||||
continue;
|
||||
|
||||
let session = { user: this._userManager.get_user(userName),
|
||||
|
@ -1,6 +1,5 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
|
||||
const FocusCaretTracker = imports.ui.focusCaretTracker;
|
||||
const Atspi = imports.gi.Atspi;
|
||||
const Clutter = imports.gi.Clutter;
|
||||
const Gdk = imports.gi.Gdk;
|
||||
@ -13,6 +12,7 @@ const Signals = imports.signals;
|
||||
const St = imports.gi.St;
|
||||
const InputSourceManager = imports.ui.status.keyboard;
|
||||
|
||||
const IBusManager = imports.misc.ibusManager;
|
||||
const BoxPointer = imports.ui.boxpointer;
|
||||
const Layout = imports.ui.layout;
|
||||
const Main = imports.ui.main;
|
||||
@ -261,6 +261,7 @@ var Key = new Lang.Class({
|
||||
this._extended_keyboard = null;
|
||||
this._pressTimeoutId = 0;
|
||||
this._capturedPress = false;
|
||||
|
||||
this._capturedEventId = 0;
|
||||
this._unmapId = 0;
|
||||
this._longPress = false;
|
||||
@ -484,6 +485,79 @@ var KeyboardModel = new Lang.Class({
|
||||
}
|
||||
});
|
||||
|
||||
var FocusTracker = new Lang.Class({
|
||||
Name: 'FocusTracker',
|
||||
|
||||
_init() {
|
||||
this._currentWindow = null;
|
||||
this._currentWindowPositionId = 0;
|
||||
|
||||
global.display.connect('notify::focus-window', () => {
|
||||
this._setCurrentWindow(global.display.focus_window);
|
||||
this.emit('window-changed', this._currentWindow);
|
||||
});
|
||||
|
||||
/* Valid for wayland clients */
|
||||
Main.inputMethod.connect('cursor-location-changed', (o, rect) => {
|
||||
let newRect = { x: rect.get_x(), y: rect.get_y(), width: rect.get_width(), height: rect.get_height() };
|
||||
this._setCurrentRect(newRect);
|
||||
});
|
||||
|
||||
this._ibusManager = IBusManager.getIBusManager();
|
||||
this._ibusManager.connect('set-cursor-location', (manager, rect) => {
|
||||
/* Valid for X11 clients only */
|
||||
if (Main.inputMethod.currentFocus)
|
||||
return;
|
||||
|
||||
this._setCurrentRect(rect);
|
||||
});
|
||||
},
|
||||
|
||||
get currentWindow() {
|
||||
return this._currentWindow;
|
||||
},
|
||||
|
||||
_setCurrentWindow(window) {
|
||||
if (this._currentWindow)
|
||||
this._currentWindow.disconnect(this._currentWindowPositionId);
|
||||
|
||||
this._currentWindow = window;
|
||||
if (window) {
|
||||
this._currentWindowPositionId = this._currentWindow.connect('position-changed', () => {
|
||||
if (global.display.get_grab_op() == Meta.GrabOp.NONE)
|
||||
this.emit('position-changed');
|
||||
else
|
||||
this.emit('reset');
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
_setCurrentRect(rect) {
|
||||
if (this._currentWindow) {
|
||||
let frameRect = this._currentWindow.get_frame_rect();
|
||||
rect.x -= frameRect.x;
|
||||
rect.y -= frameRect.y;
|
||||
}
|
||||
|
||||
this._rect = rect;
|
||||
this.emit('position-changed');
|
||||
},
|
||||
|
||||
getCurrentRect() {
|
||||
let rect = { x: this._rect.x, y: this._rect.y,
|
||||
width: this._rect.width, height: this._rect.height };
|
||||
|
||||
if (this._currentWindow) {
|
||||
let frameRect = this._currentWindow.get_frame_rect();
|
||||
rect.x += frameRect.x;
|
||||
rect.y += frameRect.y;
|
||||
}
|
||||
|
||||
return rect;
|
||||
}
|
||||
});
|
||||
Signals.addSignalMethods(FocusTracker.prototype);
|
||||
|
||||
var Keyboard = new Lang.Class({
|
||||
Name: 'Keyboard',
|
||||
|
||||
@ -491,15 +565,10 @@ var Keyboard = new Lang.Class({
|
||||
this.actor = null;
|
||||
this._focusInExtendedKeys = false;
|
||||
|
||||
this._focusCaretTracker = new FocusCaretTracker.FocusCaretTracker();
|
||||
this._focusCaretTracker.connect('focus-changed', this._onFocusChanged.bind(this));
|
||||
this._focusCaretTracker.connect('caret-moved', this._onCaretMoved.bind(this));
|
||||
this._languagePopup = null;
|
||||
this._currentAccessible = null;
|
||||
this._caretTrackingEnabled = false;
|
||||
this._updateCaretPositionId = 0;
|
||||
this._currentFocusWindow = null;
|
||||
this._originalWindowY = null;
|
||||
this._animFocusedWindow = null;
|
||||
this._delayedAnimFocusWindow = null;
|
||||
|
||||
this._enableKeyboard = false; // a11y settings value
|
||||
this._enabled = false; // enabled state (by setting or device type)
|
||||
@ -510,6 +579,14 @@ var Keyboard = new Lang.Class({
|
||||
this._lastDeviceId = null;
|
||||
this._suggestions = null;
|
||||
|
||||
this._focusTracker = new FocusTracker();
|
||||
this._focusTracker.connect('position-changed', this._onFocusPositionChanged.bind(this));
|
||||
this._focusTracker.connect('reset', () => {
|
||||
this._delayedAnimFocusWindow = null;
|
||||
this._animFocusedWindow = null;
|
||||
this._oskFocusWindow = null;
|
||||
});
|
||||
|
||||
Meta.get_backend().connect('last-device-changed',
|
||||
(backend, deviceId) => {
|
||||
let manager = Clutter.DeviceManager.get_default();
|
||||
@ -532,102 +609,15 @@ var Keyboard = new Lang.Class({
|
||||
this._keyboardRestingId = 0;
|
||||
|
||||
Main.layoutManager.connect('monitors-changed', this._relayout.bind(this));
|
||||
//Main.inputMethod.connect('cursor-location-changed', (o, rect) => {
|
||||
// if (this._keyboardVisible) {
|
||||
// let currentWindow = global.display.focus_window;
|
||||
// this.setCursorLocation(currentWindow, rect.get_x(), rect.get_y(),
|
||||
// rect.get_width(), rect.get_height());
|
||||
// }
|
||||
//});
|
||||
},
|
||||
|
||||
get visible() {
|
||||
return this._keyboardVisible;
|
||||
},
|
||||
|
||||
_setCaretTrackerEnabled(enabled) {
|
||||
if (this._caretTrackingEnabled == enabled)
|
||||
return;
|
||||
|
||||
this._caretTrackingEnabled = enabled;
|
||||
|
||||
if (enabled) {
|
||||
this._focusCaretTracker.registerFocusListener();
|
||||
this._focusCaretTracker.registerCaretListener();
|
||||
} else {
|
||||
this._focusCaretTracker.deregisterFocusListener();
|
||||
this._focusCaretTracker.deregisterCaretListener();
|
||||
}
|
||||
},
|
||||
|
||||
_updateCaretPosition(accessible) {
|
||||
if (this._updateCaretPositionId)
|
||||
GLib.source_remove(this._updateCaretPositionId);
|
||||
if (!this._keyboardRequested)
|
||||
return;
|
||||
this._updateCaretPositionId = GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
|
||||
this._updateCaretPositionId = 0;
|
||||
|
||||
let currentWindow = global.display.focus_window;
|
||||
if (!currentWindow) {
|
||||
this.setCursorLocation(null);
|
||||
return GLib.SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
let windowRect = currentWindow.get_frame_rect();
|
||||
let text = accessible.get_text_iface();
|
||||
let component = accessible.get_component_iface();
|
||||
|
||||
try {
|
||||
let caretOffset = text.get_caret_offset();
|
||||
let caretRect = text.get_character_extents(caretOffset, Atspi.CoordType.WINDOW);
|
||||
let focusRect = component.get_extents(Atspi.CoordType.WINDOW);
|
||||
|
||||
if (caretRect.width == 0 && caretRect.height == 0)
|
||||
caretRect = focusRect;
|
||||
|
||||
this.setCursorLocation(currentWindow, caretRect.x, caretRect.y, caretRect.width, caretRect.height);
|
||||
} catch (e) {
|
||||
log('Error updating caret position for OSK: ' + e.message);
|
||||
}
|
||||
|
||||
return GLib.SOURCE_REMOVE;
|
||||
});
|
||||
|
||||
GLib.Source.set_name_by_id(this._updateCaretPositionId, '[gnome-shell] this._updateCaretPosition');
|
||||
},
|
||||
|
||||
_focusIsTextEntry(accessible) {
|
||||
try {
|
||||
let role = accessible.get_role();
|
||||
let stateSet = accessible.get_state_set();
|
||||
return stateSet.contains(Atspi.StateType.EDITABLE) || role == Atspi.Role.TERMINAL;
|
||||
} catch (e) {
|
||||
log('Error determining accessible role: ' + e.message);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
_onFocusChanged(caretTracker, event) {
|
||||
let accessible = event.source;
|
||||
if (!this._focusIsTextEntry(accessible))
|
||||
return;
|
||||
|
||||
let focused = event.detail1 != 0;
|
||||
if (focused) {
|
||||
this._currentAccessible = accessible;
|
||||
this._updateCaretPosition(accessible);
|
||||
this.show(Main.layoutManager.focusIndex);
|
||||
} else if (this._currentAccessible == accessible) {
|
||||
this._currentAccessible = null;
|
||||
this.hide();
|
||||
}
|
||||
},
|
||||
|
||||
_onCaretMoved(caretTracker, event) {
|
||||
let accessible = event.source;
|
||||
if (this._currentAccessible == accessible)
|
||||
this._updateCaretPosition(accessible);
|
||||
_onFocusPositionChanged(focusTracker) {
|
||||
let rect = focusTracker.getCurrentRect();
|
||||
this.setCursorLocation(focusTracker.currentWindow, rect.x, rect.y, rect.width, rect.height);
|
||||
},
|
||||
|
||||
_lastDeviceIsTouchscreen() {
|
||||
@ -650,8 +640,6 @@ var Keyboard = new Lang.Class({
|
||||
if (!this._enabled && !this._keyboardController)
|
||||
return;
|
||||
|
||||
this._setCaretTrackerEnabled(this._enabled);
|
||||
|
||||
if (this._enabled && !this._keyboardController)
|
||||
this._setupKeyboard();
|
||||
else if (!this._enabled)
|
||||
@ -1029,11 +1017,14 @@ var Keyboard = new Lang.Class({
|
||||
if (!this._keyboardRequested)
|
||||
return;
|
||||
|
||||
if (this._currentAccessible)
|
||||
this._updateCaretPosition(this._currentAccessible);
|
||||
Main.layoutManager.keyboardIndex = monitor;
|
||||
this._relayout();
|
||||
Main.layoutManager.showKeyboard();
|
||||
|
||||
if (this._delayedAnimFocusWindow) {
|
||||
this._setAnimationWindow(this._delayedAnimFocusWindow);
|
||||
this._delayedAnimFocusWindow = null;
|
||||
}
|
||||
},
|
||||
|
||||
hide() {
|
||||
@ -1104,8 +1095,9 @@ var Keyboard = new Lang.Class({
|
||||
window.move_frame(true, frameRect.x, frameRect.y);
|
||||
},
|
||||
|
||||
_animateWindow(window, show, deltaY) {
|
||||
_animateWindow(window, show) {
|
||||
let windowActor = window.get_compositor_private();
|
||||
let deltaY = Main.layoutManager.keyboardBox.height;
|
||||
if (!windowActor)
|
||||
return;
|
||||
|
||||
@ -1126,35 +1118,39 @@ var Keyboard = new Lang.Class({
|
||||
}
|
||||
},
|
||||
|
||||
setCursorLocation(window, x, y , w, h) {
|
||||
if (window == this._oskFocusWindow)
|
||||
_setAnimationWindow(window) {
|
||||
if (this._animFocusedWindow == window)
|
||||
return;
|
||||
|
||||
if (this._oskFocusWindow) {
|
||||
let display = global.display;
|
||||
if (this._animFocusedWindow)
|
||||
this._animateWindow(this._animFocusedWindow, false);
|
||||
if (window)
|
||||
this._animateWindow(window, true);
|
||||
|
||||
if (display.get_grab_op() == Meta.GrabOp.NONE ||
|
||||
display.get_focus_window() != this._oskFocusWindow)
|
||||
this._animateWindow(this._oskFocusWindow, false, this._oskFocusWindowDelta);
|
||||
this._animFocusedWindow = window;
|
||||
},
|
||||
|
||||
this._oskFocusWindow = null;
|
||||
this._oskFocusWindowDelta = null;
|
||||
}
|
||||
setCursorLocation(window, x, y , w, h) {
|
||||
let monitor = Main.layoutManager.keyboardMonitor;
|
||||
|
||||
if (window) {
|
||||
let monitor = Main.layoutManager.keyboardMonitor;
|
||||
if (window && monitor) {
|
||||
let keyboardHeight = Main.layoutManager.keyboardBox.height;
|
||||
let frameRect = window.get_frame_rect();
|
||||
let windowActor = window.get_compositor_private();
|
||||
let delta = 0;
|
||||
let focusObscured = false;
|
||||
|
||||
if (monitor && frameRect.y + y + h >= monitor.height - keyboardHeight)
|
||||
delta = keyboardHeight;
|
||||
|
||||
this._animateWindow(window, true, delta);
|
||||
this._oskFocusWindow = window;
|
||||
this._oskFocusWindowDelta = delta;
|
||||
if (y + h >= monitor.y + monitor.height - keyboardHeight) {
|
||||
if (this._keyboardVisible)
|
||||
this._setAnimationWindow(window);
|
||||
else
|
||||
this._delayedAnimFocusWindow = window;
|
||||
} else if (y < keyboardHeight) {
|
||||
this._delayedAnimFocusWindow = null;
|
||||
this._setAnimationWindow(null);
|
||||
}
|
||||
} else {
|
||||
this._setAnimationWindow(null);
|
||||
}
|
||||
|
||||
this._oskFocusWindow = window;
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -831,8 +831,10 @@ var GtkNotificationDaemon = new Lang.Class({
|
||||
let source;
|
||||
try {
|
||||
source = this._ensureAppSource(appId);
|
||||
} catch(e if e instanceof InvalidAppError) {
|
||||
return;
|
||||
} catch(e) {
|
||||
if (e instanceof InvalidAppError)
|
||||
return;
|
||||
throw e;
|
||||
}
|
||||
|
||||
notifications.forEach(([notificationId, notification]) => {
|
||||
@ -863,9 +865,12 @@ var GtkNotificationDaemon = new Lang.Class({
|
||||
let source;
|
||||
try {
|
||||
source = this._ensureAppSource(appId);
|
||||
} catch(e if e instanceof InvalidAppError) {
|
||||
invocation.return_dbus_error('org.gtk.Notifications.InvalidApp', 'The app by ID "%s" could not be found'.format(appId));
|
||||
return;
|
||||
} catch(e) {
|
||||
if (e instanceof InvalidAppError) {
|
||||
invocation.return_dbus_error('org.gtk.Notifications.InvalidApp', 'The app by ID "%s" could not be found'.format(appId));
|
||||
return;
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
||||
let timestamp = GLib.DateTime.new_now_local().to_unix();
|
||||
|
@ -797,6 +797,7 @@ var Panel = new Lang.Class({
|
||||
this.actor.connect('get-preferred-height', this._getPreferredHeight.bind(this));
|
||||
this.actor.connect('allocate', this._allocate.bind(this));
|
||||
this.actor.connect('button-press-event', this._onButtonPress.bind(this));
|
||||
this.actor.connect('touch-event', this._onButtonPress.bind(this));
|
||||
this.actor.connect('key-press-event', this._onKeyPress.bind(this));
|
||||
|
||||
Main.overview.connect('showing', () => {
|
||||
@ -940,8 +941,13 @@ var Panel = new Lang.Class({
|
||||
if (event.get_source() != actor)
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
|
||||
let button = event.get_button();
|
||||
if (button != 1)
|
||||
let type = event.type();
|
||||
let isPress = type == Clutter.EventType.BUTTON_PRESS;
|
||||
if (!isPress && type != Clutter.EventType.TOUCH_BEGIN)
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
|
||||
let button = isPress ? event.get_button() : -1;
|
||||
if (isPress && button != 1)
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
|
||||
let focusWindow = global.display.focus_window;
|
||||
|
@ -141,8 +141,17 @@ var PopupBaseMenuItem = new Lang.Class({
|
||||
},
|
||||
|
||||
_onKeyPressEvent(actor, event) {
|
||||
let symbol = event.get_key_symbol();
|
||||
let state = event.get_state();
|
||||
|
||||
// if user has a modifier down (except capslock)
|
||||
// then don't handle the key press here
|
||||
state &= ~Clutter.ModifierType.LOCK_MASK;
|
||||
state &= Clutter.ModifierType.MODIFIER_MASK;
|
||||
|
||||
if (state)
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
|
||||
let symbol = event.get_key_symbol();
|
||||
if (symbol == Clutter.KEY_space || symbol == Clutter.KEY_Return) {
|
||||
this.activate(event);
|
||||
return Clutter.EVENT_STOP;
|
||||
|
@ -172,9 +172,10 @@ var RunDialog = new Lang.Class({
|
||||
if (name.slice(0, text.length) == text)
|
||||
results.push(name);
|
||||
}
|
||||
} catch (e if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND) &&
|
||||
!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_DIRECTORY))) {
|
||||
log(e);
|
||||
} catch (e) {
|
||||
if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND) &&
|
||||
!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_DIRECTORY))
|
||||
log(e);
|
||||
} finally {
|
||||
return results;
|
||||
}
|
||||
|
@ -216,12 +216,14 @@ function _step(g, finish, onError) {
|
||||
if (onError)
|
||||
onError(err);
|
||||
});
|
||||
} catch (err if err instanceof StopIteration) {
|
||||
if (finish)
|
||||
finish();
|
||||
} catch (err) {
|
||||
if (onError)
|
||||
onError(err);
|
||||
if (err instanceof StopIteration) {
|
||||
if (finish)
|
||||
finish();
|
||||
} else {
|
||||
if (onError)
|
||||
onError(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,9 @@ var SwitcherPopup = new Lang.Class({
|
||||
if (this._keyPressHandler(keysym, action) != Clutter.EVENT_PROPAGATE)
|
||||
return Clutter.EVENT_STOP;
|
||||
|
||||
if (keysym == Clutter.Escape)
|
||||
// Note: pressing one of the below keys will destroy the popup only if
|
||||
// that key is not used by the active popup's keyboard shortcut
|
||||
if (keysym == Clutter.Escape || keysym == Clutter.Tab)
|
||||
this.destroy();
|
||||
|
||||
return Clutter.EVENT_STOP;
|
||||
|
19
meson.build
19
meson.build
@ -1,5 +1,5 @@
|
||||
project('gnome-shell', 'c',
|
||||
version: '3.29.3',
|
||||
version: '3.29.4',
|
||||
meson_version: '>= 0.42.0',
|
||||
license: 'GPLv2+'
|
||||
)
|
||||
@ -23,7 +23,7 @@ gi_req = '>= 1.49.1'
|
||||
gjs_req = '>= 1.47.0'
|
||||
gtk_req = '>= 3.15.0'
|
||||
json_glib_req = '>= 0.13.2'
|
||||
mutter_req = '>= 3.29.2'
|
||||
mutter_req = '>= 3.29.4'
|
||||
polkit_req = '>= 0.100'
|
||||
schemas_req = '>= 3.21.3'
|
||||
startup_req = '>= 0.11'
|
||||
@ -59,6 +59,13 @@ servicedir = join_paths(datadir, 'dbus-1', 'services')
|
||||
|
||||
plugindir = get_variable('BROWSER_PLUGIN_DIR', mozplugindir)
|
||||
|
||||
# XXX: Once https://github.com/systemd/systemd/issues/9595 is fixed and we can
|
||||
# depend on this version, replace with something like:
|
||||
# systemduserunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir',
|
||||
# define_variable: ['prefix', prefix])
|
||||
# and uncomment systemd_dep below
|
||||
systemduserunitdir = join_paths(libdir, 'systemd', 'user')
|
||||
|
||||
keybindings_dep = dependency('gnome-keybindings', required: false)
|
||||
if keybindings_dep.found()
|
||||
keysdir = keybindings_dep.get_pkgconfig_variable('keysdir')
|
||||
@ -117,10 +124,12 @@ else
|
||||
endif
|
||||
|
||||
if get_option('systemd')
|
||||
systemd_dep = dependency('libsystemd')
|
||||
have_systemd = systemd_dep.found()
|
||||
libsystemd_dep = dependency('libsystemd')
|
||||
# XXX: see systemduserunitdir
|
||||
# systemd_dep = dependency('systemd')
|
||||
have_systemd = true
|
||||
else
|
||||
systemd_dep = []
|
||||
libsystemd_dep = []
|
||||
have_systemd = false
|
||||
endif
|
||||
|
||||
|
20
po/ru.po
20
po/ru.po
@ -12,14 +12,14 @@
|
||||
# Valery Kirichenko <valera5505@gmail.com>, 2014.
|
||||
# Yuri Myasoedov <ymyasoedov@yandex.ru>, 2012, 2013, 2014.
|
||||
# Ivan Komaritsyn <vantu5z@mail.ru>, 2015.
|
||||
# Stas Solovey <whats_up@tut.by>, 2011, 2013, 2014, 2015, 2016, 2017.
|
||||
# Stas Solovey <whats_up@tut.by>, 2011, 2013, 2014, 2015, 2016, 2017, 2018.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gnome-shell\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
|
||||
"POT-Creation-Date: 2018-04-13 18:31+0000\n"
|
||||
"PO-Revision-Date: 2018-04-19 23:31+0300\n"
|
||||
"POT-Creation-Date: 2018-04-19 20:33+0000\n"
|
||||
"PO-Revision-Date: 2018-07-17 00:25+0300\n"
|
||||
"Last-Translator: Stas Solovey <whats_up@tut.by>\n"
|
||||
"Language-Team: Русский <gnome-cyr@gnome.org>\n"
|
||||
"Language: ru\n"
|
||||
@ -28,7 +28,7 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
||||
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"X-Generator: Poedit 2.0.6\n"
|
||||
"X-Generator: Poedit 2.0.9\n"
|
||||
|
||||
#: data/50-gnome-shell-system.xml:6
|
||||
msgid "System"
|
||||
@ -364,20 +364,20 @@ msgctxt "button"
|
||||
msgid "Sign In"
|
||||
msgstr "Войти"
|
||||
|
||||
#: js/gdm/loginDialog.js:315
|
||||
#: js/gdm/loginDialog.js:319
|
||||
msgid "Choose Session"
|
||||
msgstr "Выбрать сеанс"
|
||||
|
||||
#. translators: this message is shown below the user list on the
|
||||
#. login screen. It can be activated to reveal an entry for
|
||||
#. manually entering the username.
|
||||
#: js/gdm/loginDialog.js:458
|
||||
#: js/gdm/loginDialog.js:462
|
||||
msgid "Not listed?"
|
||||
msgstr "Нет в списке?"
|
||||
|
||||
#. Translators: this message is shown below the username entry field
|
||||
#. to clue the user in on how to login to the local network realm
|
||||
#: js/gdm/loginDialog.js:887
|
||||
#: js/gdm/loginDialog.js:891
|
||||
#, javascript-format
|
||||
msgid "(e.g., user or %s)"
|
||||
msgstr "(например, пользователь или %s)"
|
||||
@ -385,12 +385,12 @@ msgstr "(например, пользователь или %s)"
|
||||
#. TTLS and PEAP are actually much more complicated, but this complication
|
||||
#. is not visible here since we only care about phase2 authentication
|
||||
#. (and don't even care of which one)
|
||||
#: js/gdm/loginDialog.js:892 js/ui/components/networkAgent.js:243
|
||||
#: js/gdm/loginDialog.js:896 js/ui/components/networkAgent.js:243
|
||||
#: js/ui/components/networkAgent.js:261
|
||||
msgid "Username: "
|
||||
msgstr "Имя пользователя: "
|
||||
|
||||
#: js/gdm/loginDialog.js:1228
|
||||
#: js/gdm/loginDialog.js:1234
|
||||
msgid "Login Window"
|
||||
msgstr "Окно входа в систему"
|
||||
|
||||
@ -2053,7 +2053,7 @@ msgstr "Ошибка авторизации Thunderbolt"
|
||||
|
||||
#: js/ui/status/thunderbolt.js:357
|
||||
#, javascript-format
|
||||
msgid "Could not authorize the thunderbolt device: %s"
|
||||
msgid "Could not authorize the Thunderbolt device: %s"
|
||||
msgstr "Не удалось авторизовать устройство Thunderbolt: %s"
|
||||
|
||||
#: js/ui/status/volume.js:128
|
||||
|
@ -53,7 +53,7 @@ gnome_shell_deps = [
|
||||
canberra_dep, canberra_gtk_dep,
|
||||
polkit_dep,
|
||||
gcr_dep,
|
||||
systemd_dep
|
||||
libsystemd_dep
|
||||
]
|
||||
|
||||
gnome_shell_deps += nm_deps
|
||||
|
@ -205,7 +205,8 @@ st_adjustment_class_init (StAdjustmentClass *klass)
|
||||
G_MAXDOUBLE,
|
||||
0.0,
|
||||
ST_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT));
|
||||
G_PARAM_CONSTRUCT |
|
||||
G_PARAM_EXPLICIT_NOTIFY));
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_UPPER,
|
||||
g_param_spec_double ("upper",
|
||||
@ -215,7 +216,8 @@ st_adjustment_class_init (StAdjustmentClass *klass)
|
||||
G_MAXDOUBLE,
|
||||
0.0,
|
||||
ST_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT));
|
||||
G_PARAM_CONSTRUCT |
|
||||
G_PARAM_EXPLICIT_NOTIFY));
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_VALUE,
|
||||
g_param_spec_double ("value",
|
||||
@ -225,7 +227,8 @@ st_adjustment_class_init (StAdjustmentClass *klass)
|
||||
G_MAXDOUBLE,
|
||||
0.0,
|
||||
ST_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT));
|
||||
G_PARAM_CONSTRUCT |
|
||||
G_PARAM_EXPLICIT_NOTIFY));
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_STEP_INC,
|
||||
g_param_spec_double ("step-increment",
|
||||
@ -235,7 +238,8 @@ st_adjustment_class_init (StAdjustmentClass *klass)
|
||||
G_MAXDOUBLE,
|
||||
0.0,
|
||||
ST_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT));
|
||||
G_PARAM_CONSTRUCT |
|
||||
G_PARAM_EXPLICIT_NOTIFY));
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_PAGE_INC,
|
||||
g_param_spec_double ("page-increment",
|
||||
@ -245,7 +249,8 @@ st_adjustment_class_init (StAdjustmentClass *klass)
|
||||
G_MAXDOUBLE,
|
||||
0.0,
|
||||
ST_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT));
|
||||
G_PARAM_CONSTRUCT |
|
||||
G_PARAM_EXPLICIT_NOTIFY));
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_PAGE_SIZE,
|
||||
g_param_spec_double ("page-size",
|
||||
@ -255,7 +260,8 @@ st_adjustment_class_init (StAdjustmentClass *klass)
|
||||
G_MAXDOUBLE,
|
||||
0.0,
|
||||
ST_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT));
|
||||
G_PARAM_CONSTRUCT |
|
||||
G_PARAM_EXPLICIT_NOTIFY));
|
||||
/**
|
||||
* StAdjustment::changed:
|
||||
* @self: the #StAdjustment
|
||||
|
@ -90,7 +90,7 @@ adjustment_value_notify_cb (StAdjustment *adjustment,
|
||||
GParamSpec *pspec,
|
||||
StBoxLayout *box)
|
||||
{
|
||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (box));
|
||||
clutter_actor_queue_relayout (CLUTTER_ACTOR (box));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -490,7 +490,7 @@ st_box_layout_get_paint_volume (ClutterActor *actor,
|
||||
ClutterPaintVolume *volume)
|
||||
{
|
||||
StBoxLayout *self = ST_BOX_LAYOUT (actor);
|
||||
gdouble x, y;
|
||||
gdouble x, y, lower, upper;
|
||||
StBoxLayoutPrivate *priv = self->priv;
|
||||
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
|
||||
ClutterActorBox allocation_box;
|
||||
@ -505,13 +505,42 @@ st_box_layout_get_paint_volume (ClutterActor *actor,
|
||||
* our paint volume on that. */
|
||||
if (priv->hadjustment || priv->vadjustment)
|
||||
{
|
||||
gdouble width, height;
|
||||
|
||||
clutter_actor_get_allocation_box (actor, &allocation_box);
|
||||
st_theme_node_get_content_box (theme_node, &allocation_box, &content_box);
|
||||
origin.x = content_box.x1 - allocation_box.x1;
|
||||
origin.y = content_box.y1 - allocation_box.y2;
|
||||
origin.z = 0.f;
|
||||
clutter_paint_volume_set_width (volume, content_box.x2 - content_box.x1);
|
||||
clutter_paint_volume_set_height (volume, content_box.y2 - content_box.y1);
|
||||
|
||||
if (priv->hadjustment)
|
||||
{
|
||||
g_object_get (priv->hadjustment,
|
||||
"lower", &lower,
|
||||
"upper", &upper,
|
||||
NULL);
|
||||
width = upper - lower;
|
||||
}
|
||||
else
|
||||
{
|
||||
width = content_box.x2 - content_box.x1;
|
||||
}
|
||||
|
||||
if (priv->vadjustment)
|
||||
{
|
||||
g_object_get (priv->vadjustment,
|
||||
"lower", &lower,
|
||||
"upper", &upper,
|
||||
NULL);
|
||||
height = upper - lower;
|
||||
}
|
||||
else
|
||||
{
|
||||
height = content_box.y2 - content_box.y1;
|
||||
}
|
||||
|
||||
clutter_paint_volume_set_width (volume, width);
|
||||
clutter_paint_volume_set_height (volume, height);
|
||||
}
|
||||
else if (!CLUTTER_ACTOR_CLASS (st_box_layout_parent_class)->get_paint_volume (actor, volume))
|
||||
return FALSE;
|
||||
|
@ -905,6 +905,13 @@ st_entry_unmap (ClutterActor *actor)
|
||||
CLUTTER_ACTOR_CLASS (st_entry_parent_class)->unmap (actor);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
st_entry_get_paint_volume (ClutterActor *actor,
|
||||
ClutterPaintVolume *volume)
|
||||
{
|
||||
return clutter_paint_volume_set_from_allocation (volume, actor);
|
||||
}
|
||||
|
||||
static void
|
||||
st_entry_class_init (StEntryClass *klass)
|
||||
{
|
||||
@ -922,6 +929,7 @@ st_entry_class_init (StEntryClass *klass)
|
||||
actor_class->allocate = st_entry_allocate;
|
||||
actor_class->paint = st_entry_paint;
|
||||
actor_class->unmap = st_entry_unmap;
|
||||
actor_class->get_paint_volume = st_entry_get_paint_volume;
|
||||
|
||||
actor_class->key_press_event = st_entry_key_press_event;
|
||||
actor_class->key_focus_in = st_entry_key_focus_in;
|
||||
|
@ -304,6 +304,13 @@ st_scroll_view_pick (ClutterActor *actor,
|
||||
clutter_actor_paint (priv->vscroll);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
st_scroll_view_get_paint_volume (ClutterActor *actor,
|
||||
ClutterPaintVolume *volume)
|
||||
{
|
||||
return clutter_paint_volume_set_from_allocation (volume, actor);
|
||||
}
|
||||
|
||||
static double
|
||||
get_scrollbar_width (StScrollView *scroll,
|
||||
gfloat for_height)
|
||||
@ -793,6 +800,7 @@ st_scroll_view_class_init (StScrollViewClass *klass)
|
||||
|
||||
actor_class->paint = st_scroll_view_paint;
|
||||
actor_class->pick = st_scroll_view_pick;
|
||||
actor_class->get_paint_volume = st_scroll_view_get_paint_volume;
|
||||
actor_class->get_preferred_width = st_scroll_view_get_preferred_width;
|
||||
actor_class->get_preferred_height = st_scroll_view_get_preferred_height;
|
||||
actor_class->allocate = st_scroll_view_allocate;
|
||||
|
@ -780,13 +780,13 @@ st_texture_cache_load (StTextureCache *cache,
|
||||
if (!texture)
|
||||
{
|
||||
texture = load (cache, key, data, error);
|
||||
if (texture)
|
||||
if (texture && policy == ST_TEXTURE_CACHE_POLICY_FOREVER)
|
||||
g_hash_table_insert (cache->priv->keyed_cache, g_strdup (key), texture);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
cogl_object_ref (texture);
|
||||
if (texture && policy == ST_TEXTURE_CACHE_POLICY_FOREVER)
|
||||
cogl_object_ref (texture);
|
||||
|
||||
return texture;
|
||||
}
|
||||
|
||||
|
@ -402,7 +402,7 @@ st_theme_node_lookup_corner (StThemeNode *node,
|
||||
return COGL_INVALID_HANDLE;
|
||||
|
||||
key = corner_to_string (&corner);
|
||||
texture = st_texture_cache_load (cache, key, ST_TEXTURE_CACHE_POLICY_NONE, load_corner, &corner, NULL);
|
||||
texture = st_texture_cache_load (cache, key, ST_TEXTURE_CACHE_POLICY_FOREVER, load_corner, &corner, NULL);
|
||||
|
||||
if (texture)
|
||||
{
|
||||
|
Reference in New Issue
Block a user