Merge branch 'master' into datetime
This commit is contained in:
commit
a71c82863e
@ -33,7 +33,7 @@
|
|||||||
<foaf:Person>
|
<foaf:Person>
|
||||||
<foaf:name>Colin Walters</foaf:name>
|
<foaf:name>Colin Walters</foaf:name>
|
||||||
<foaf:mbox rdf:resource="mailto:walters@verbum.org" />
|
<foaf:mbox rdf:resource="mailto:walters@verbum.org" />
|
||||||
<gnome:userid>cwalters</gnome:userid>
|
<gnome:userid>walters</gnome:userid>
|
||||||
</foaf:Person>
|
</foaf:Person>
|
||||||
</maintainer>
|
</maintainer>
|
||||||
<maintainer>
|
<maintainer>
|
||||||
|
@ -946,6 +946,8 @@ AppSwitcher.prototype = {
|
|||||||
this._mouseTimeOutId = Mainloop.timeout_add(APP_ICON_HOVER_TIMEOUT,
|
this._mouseTimeOutId = Mainloop.timeout_add(APP_ICON_HOVER_TIMEOUT,
|
||||||
Lang.bind(this, function () {
|
Lang.bind(this, function () {
|
||||||
this._enterItem(index);
|
this._enterItem(index);
|
||||||
|
this._mouseTimeOutId = 0;
|
||||||
|
return false;
|
||||||
}));
|
}));
|
||||||
} else
|
} else
|
||||||
this._itemEntered(index);
|
this._itemEntered(index);
|
||||||
|
@ -276,6 +276,8 @@ Overview.prototype = {
|
|||||||
|
|
||||||
_onCapturedEvent: function(actor, event) {
|
_onCapturedEvent: function(actor, event) {
|
||||||
let stageX, stageY;
|
let stageX, stageY;
|
||||||
|
let threshold = Gtk.Settings.get_default().gtk_dnd_drag_threshold;
|
||||||
|
|
||||||
switch(event.type()) {
|
switch(event.type()) {
|
||||||
case Clutter.EventType.BUTTON_RELEASE:
|
case Clutter.EventType.BUTTON_RELEASE:
|
||||||
[stageX, stageY] = event.get_coords();
|
[stageX, stageY] = event.get_coords();
|
||||||
@ -324,16 +326,16 @@ Overview.prototype = {
|
|||||||
newValue += difference;
|
newValue += difference;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let result;
|
||||||
|
|
||||||
// See if the user has moved the mouse enough to trigger
|
// See if the user has moved the mouse enough to trigger
|
||||||
// a drag
|
// a drag
|
||||||
let threshold = Gtk.Settings.get_default().gtk_dnd_drag_threshold;
|
|
||||||
if (Math.abs(stageX - this._dragStartX) < threshold &&
|
if (Math.abs(stageX - this._dragStartX) < threshold &&
|
||||||
Math.abs(stageY - this._dragStartY) < threshold) {
|
Math.abs(stageY - this._dragStartY) < threshold) {
|
||||||
// no motion? It's a click!
|
// no motion? It's a click!
|
||||||
this.emit('swipe-scroll-end', SwipeScrollResult.CLICK);
|
result = SwipeScrollResult.CLICK;
|
||||||
|
this.emit('swipe-scroll-end', result);
|
||||||
} else {
|
} else {
|
||||||
let result;
|
|
||||||
|
|
||||||
if (newValue == this._dragStartValue)
|
if (newValue == this._dragStartValue)
|
||||||
result = SwipeScrollResult.CANCEL;
|
result = SwipeScrollResult.CANCEL;
|
||||||
else
|
else
|
||||||
@ -362,7 +364,7 @@ Overview.prototype = {
|
|||||||
global.stage.disconnect(this._capturedEventId);
|
global.stage.disconnect(this._capturedEventId);
|
||||||
this._capturedEventId = 0;
|
this._capturedEventId = 0;
|
||||||
|
|
||||||
return true;
|
return result != SwipeScrollResult.CLICK;
|
||||||
|
|
||||||
case Clutter.EventType.MOTION:
|
case Clutter.EventType.MOTION:
|
||||||
[stageX, stageY] = event.get_coords();
|
[stageX, stageY] = event.get_coords();
|
||||||
@ -370,6 +372,16 @@ Overview.prototype = {
|
|||||||
let dy = this._dragY - stageY;
|
let dy = this._dragY - stageY;
|
||||||
let primary = global.get_primary_monitor();
|
let primary = global.get_primary_monitor();
|
||||||
|
|
||||||
|
this._dragX = stageX;
|
||||||
|
this._dragY = stageY;
|
||||||
|
this._lastMotionTime = event.get_time();
|
||||||
|
|
||||||
|
// See if the user has moved the mouse enough to trigger
|
||||||
|
// a drag
|
||||||
|
if (Math.abs(stageX - this._dragStartX) < threshold &&
|
||||||
|
Math.abs(stageY - this._dragStartY) < threshold)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (this._scrollDirection == SwipeScrollDirection.HORIZONTAL) {
|
if (this._scrollDirection == SwipeScrollDirection.HORIZONTAL) {
|
||||||
if (St.Widget.get_default_direction() == St.TextDirection.RTL)
|
if (St.Widget.get_default_direction() == St.TextDirection.RTL)
|
||||||
this._scrollAdjustment.value -= (dx / primary.width) * this._scrollAdjustment.page_size;
|
this._scrollAdjustment.value -= (dx / primary.width) * this._scrollAdjustment.page_size;
|
||||||
@ -379,10 +391,6 @@ Overview.prototype = {
|
|||||||
this._scrollAdjustment.value += (dy / primary.height) * this._scrollAdjustment.page_size;
|
this._scrollAdjustment.value += (dy / primary.height) * this._scrollAdjustment.page_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._dragX = stageX;
|
|
||||||
this._dragY = stageY;
|
|
||||||
this._lastMotionTime = event.get_time();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Block enter/leave events to avoid prelights
|
// Block enter/leave events to avoid prelights
|
||||||
|
@ -412,6 +412,8 @@ recorder_fetch_cursor_image (ShellRecorder *recorder)
|
|||||||
for (i = 0; i < cursor_image->height; i++)
|
for (i = 0; i < cursor_image->height; i++)
|
||||||
for (j = 0; j < cursor_image->width; j++)
|
for (j = 0; j < cursor_image->width; j++)
|
||||||
*(guint32 *)(data + i * stride + 4 * j) = cursor_image->pixels[i * cursor_image->width + j];
|
*(guint32 *)(data + i * stride + 4 * j) = cursor_image->pixels[i * cursor_image->width + j];
|
||||||
|
|
||||||
|
cairo_surface_mark_dirty (recorder->cursor_image);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Overlay the cursor image on the frame. We draw the cursor image
|
/* Overlay the cursor image on the frame. We draw the cursor image
|
||||||
|
Loading…
Reference in New Issue
Block a user