mirror of
https://github.com/elementary/gala.git
synced 2024-09-11 15:15:39 +03:00
Works somewhat now but no modal
This commit is contained in:
parent
47eab26602
commit
8e347624ac
@ -43,6 +43,7 @@ public class Gala.PanBackend : Object {
|
||||
}
|
||||
|
||||
private void on_gesture_end () {
|
||||
warning ("PAN GESTURE END");
|
||||
started = false;
|
||||
direction = GestureDirection.UNKNOWN;
|
||||
|
||||
@ -52,9 +53,7 @@ public class Gala.PanBackend : Object {
|
||||
}
|
||||
|
||||
private bool on_pan (Clutter.PanAction pan_action, Clutter.Actor actor, bool interpolate) {
|
||||
if (pan_action != pan_action) {
|
||||
return false;
|
||||
}
|
||||
warning ("PAN");
|
||||
|
||||
uint64 time = pan_action.get_last_event (0).get_time ();
|
||||
|
||||
|
@ -62,7 +62,6 @@ public class Gala.ScrollBackend : Object {
|
||||
delta_y = 0;
|
||||
direction = GestureDirection.UNKNOWN;
|
||||
on_end (delta_x.abs (), pan_action.get_last_event (0).get_time ());
|
||||
warning ("GESTURE END");
|
||||
});
|
||||
}
|
||||
|
||||
@ -77,13 +76,10 @@ public class Gala.ScrollBackend : Object {
|
||||
double x, y;
|
||||
pan_action.get_motion_delta (0, out x, out y);
|
||||
|
||||
warning (x.to_string ());
|
||||
|
||||
x = x / actor.get_allocation_box ().get_width ();
|
||||
y = y / actor.get_height ();
|
||||
|
||||
warning (x.to_string ());
|
||||
warning (delta_x.to_string ());
|
||||
|
||||
delta_x += x;
|
||||
delta_y += y;
|
||||
@ -97,7 +93,6 @@ public class Gala.ScrollBackend : Object {
|
||||
|
||||
double delta = calculate_delta (delta_x, delta_y, direction);
|
||||
on_begin (delta_x.abs (), time);
|
||||
warning ("BEGIN");
|
||||
}
|
||||
} else {
|
||||
double delta = calculate_delta (delta_x, delta_y, direction);
|
||||
@ -109,9 +104,7 @@ public class Gala.ScrollBackend : Object {
|
||||
// on_end (delta, time);
|
||||
// warning ("END");
|
||||
} else {
|
||||
warning (delta.to_string ());
|
||||
on_update (delta_x.abs (), time);
|
||||
warning ("UPDATE");
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,7 +116,6 @@ public class Gala.ScrollBackend : Object {
|
||||
#else
|
||||
private bool on_scroll_event (Clutter.ScrollEvent event) {
|
||||
#endif
|
||||
warning ("SCROLL EVENT");
|
||||
if (!can_handle_event (event)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -68,8 +68,8 @@ namespace Gala {
|
||||
opened = false;
|
||||
display = wm.get_display ();
|
||||
|
||||
multitasking_gesture_tracker = new GestureTracker (ANIMATION_DURATION, ANIMATION_DURATION);
|
||||
multitasking_gesture_tracker.enable_touchpad ();
|
||||
multitasking_gesture_tracker = ((WindowManagerGala)wm).gesture_tracker;
|
||||
// multitasking_gesture_tracker.enable_touchpad ();
|
||||
multitasking_gesture_tracker.on_gesture_detected.connect (on_multitasking_gesture_detected);
|
||||
|
||||
workspace_gesture_tracker = new GestureTracker (AnimationDuration.WORKSPACE_SWITCH_MIN, AnimationDuration.WORKSPACE_SWITCH);
|
||||
@ -692,8 +692,8 @@ namespace Gala {
|
||||
}
|
||||
|
||||
if (opening) {
|
||||
modal_proxy = wm.push_modal (this);
|
||||
modal_proxy.set_keybinding_filter (keybinding_filter);
|
||||
// modal_proxy = wm.push_modal (this);
|
||||
// modal_proxy.set_keybinding_filter (keybinding_filter);
|
||||
|
||||
wm.background_group.hide ();
|
||||
wm.window_group.hide ();
|
||||
@ -763,7 +763,7 @@ namespace Gala {
|
||||
|
||||
dock_clones.destroy_all_children ();
|
||||
|
||||
wm.pop_modal (modal_proxy);
|
||||
// wm.pop_modal (modal_proxy);
|
||||
}
|
||||
|
||||
animating = false;
|
||||
|
@ -108,7 +108,7 @@ namespace Gala {
|
||||
private GLib.Settings behavior_settings;
|
||||
private GLib.Settings new_behavior_settings;
|
||||
|
||||
private GestureTracker gesture_tracker;
|
||||
public GestureTracker gesture_tracker;
|
||||
private bool animating_switch_workspace = false;
|
||||
private bool switch_workspace_with_gesture = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user