Merge branch 'master' into datetime

This commit is contained in:
David Zeuthen 2011-01-25 10:10:22 -05:00
commit a71c82863e
4 changed files with 22 additions and 10 deletions

View File

@ -33,7 +33,7 @@
<foaf:Person>
<foaf:name>Colin Walters</foaf:name>
<foaf:mbox rdf:resource="mailto:walters@verbum.org" />
<gnome:userid>cwalters</gnome:userid>
<gnome:userid>walters</gnome:userid>
</foaf:Person>
</maintainer>
<maintainer>

View File

@ -946,6 +946,8 @@ AppSwitcher.prototype = {
this._mouseTimeOutId = Mainloop.timeout_add(APP_ICON_HOVER_TIMEOUT,
Lang.bind(this, function () {
this._enterItem(index);
this._mouseTimeOutId = 0;
return false;
}));
} else
this._itemEntered(index);

View File

@ -276,6 +276,8 @@ Overview.prototype = {
_onCapturedEvent: function(actor, event) {
let stageX, stageY;
let threshold = Gtk.Settings.get_default().gtk_dnd_drag_threshold;
switch(event.type()) {
case Clutter.EventType.BUTTON_RELEASE:
[stageX, stageY] = event.get_coords();
@ -324,16 +326,16 @@ Overview.prototype = {
newValue += difference;
}
let result;
// See if the user has moved the mouse enough to trigger
// a drag
let threshold = Gtk.Settings.get_default().gtk_dnd_drag_threshold;
if (Math.abs(stageX - this._dragStartX) < threshold &&
Math.abs(stageY - this._dragStartY) < threshold) {
// no motion? It's a click!
this.emit('swipe-scroll-end', SwipeScrollResult.CLICK);
result = SwipeScrollResult.CLICK;
this.emit('swipe-scroll-end', result);
} else {
let result;
if (newValue == this._dragStartValue)
result = SwipeScrollResult.CANCEL;
else
@ -362,7 +364,7 @@ Overview.prototype = {
global.stage.disconnect(this._capturedEventId);
this._capturedEventId = 0;
return true;
return result != SwipeScrollResult.CLICK;
case Clutter.EventType.MOTION:
[stageX, stageY] = event.get_coords();
@ -370,6 +372,16 @@ Overview.prototype = {
let dy = this._dragY - stageY;
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 (St.Widget.get_default_direction() == St.TextDirection.RTL)
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._dragX = stageX;
this._dragY = stageY;
this._lastMotionTime = event.get_time();
return true;
// Block enter/leave events to avoid prelights

View File

@ -412,6 +412,8 @@ recorder_fetch_cursor_image (ShellRecorder *recorder)
for (i = 0; i < cursor_image->height; i++)
for (j = 0; j < 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