-
Notifications
You must be signed in to change notification settings - Fork 41
Add hold gesture to move window to different workspace #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
harshadgavali
wants to merge
1
commit into
main
Choose a base branch
from
gesture/hold-gestures
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import { EventType, Event } from '@gi-types/clutter8'; | ||
|
|
||
| export const ClutterEventType = { TOUCHPAD_HOLD: 1234, ...EventType }; | ||
|
|
||
| export type CustomEventType = Pick< | ||
| Event, | ||
| 'type' | 'get_gesture_phase' | | ||
| 'get_touchpad_gesture_finger_count' | 'get_time' | | ||
| 'get_coords' | 'get_gesture_motion_delta_unaccelerated' | | ||
| 'get_gesture_pinch_scale' | 'get_gesture_pinch_angle_delta' | ||
| >; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,71 +15,71 @@ const OGRegisterClass = GObject.registerClass; | |
| type ConstructorType = new (...args: any[]) => any; | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Convert indetation to tabs |
||
|
|
||
| type IFaces<Interfaces extends { $gtype: GObject.GType<any> }[]> = { | ||
| [key in keyof Interfaces]: Interfaces[key] extends { $gtype: GObject.GType<infer I> } ? I : never; | ||
| [key in keyof Interfaces]: Interfaces[key] extends { $gtype: GObject.GType<infer I> } ? I : never; | ||
| }; | ||
|
|
||
| type _TupleOf<T, N extends number, R extends T[]> = R['length'] extends N ? R : _TupleOf<T, N, [T, ...R]>; | ||
| /** Tuple of Type T, and of length N */ | ||
| type Tuple<T, N extends number> = _TupleOf<T, N, []>; | ||
|
|
||
| type GObjectSignalDefinition<N extends number = 32> = { | ||
| param_types?: Partial<Tuple<GObject.GType, N>>; | ||
| [key: string]: any; | ||
| param_types?: Partial<Tuple<GObject.GType, N>>; | ||
| [key: string]: any; | ||
| }; | ||
|
|
||
| /** Get typescript type for {@link GObjectSignalDefinition.param_types} */ | ||
| type CallBackTypeTuple<T> = T extends any[] ? { [P in keyof T]: T[P] extends GObject.GType<infer R> ? R : never } : []; | ||
|
|
||
| export type RegisteredPrototype< | ||
| P extends {}, | ||
| Props extends { [key: string]: GObject.ParamSpec }, | ||
| Interfaces extends any[], | ||
| Sigs extends { [key: string]: GObjectSignalDefinition } | ||
| > = { | ||
| /// This is one of modification done by this file | ||
| connect<K extends keyof Sigs>( | ||
| key: K, | ||
| callback: ( | ||
| _source: RegisteredPrototype<P, Props, Interfaces, Sigs>, | ||
| ...args: CallBackTypeTuple<Sigs[K]['param_types']> | ||
| ) => void, | ||
| ): number, | ||
| } & GObject.RegisteredPrototype<P, Props, Interfaces>; | ||
| P extends {}, | ||
| Props extends { [key: string]: GObject.ParamSpec }, | ||
| Interfaces extends any[], | ||
| Sigs extends { [key: string]: GObjectSignalDefinition } | ||
| > = { | ||
| /// This is one of modification done by this file | ||
| connect<K extends keyof Sigs>( | ||
| key: K, | ||
| callback: ( | ||
| _source: RegisteredPrototype<P, Props, Interfaces, Sigs>, | ||
| ...args: CallBackTypeTuple<Sigs[K]['param_types']> | ||
| ) => void, | ||
| ): number, | ||
| } & GObject.RegisteredPrototype<P, Props, Interfaces>; | ||
|
|
||
| export type RegisteredClass< | ||
| T extends ConstructorType, | ||
| Props extends { [key: string]: GObject.ParamSpec }, | ||
| Interfaces extends { $gtype: GObject.GType<any> }[], | ||
| Sigs extends { [key: string]: GObjectSignalDefinition } | ||
| > = T extends { prototype: infer P } | ||
| ? { | ||
| $gtype: GObject.GType<RegisteredClass<T, Props, IFaces<Interfaces>, Sigs>>; | ||
| prototype: RegisteredPrototype<P, Props, IFaces<Interfaces>, Sigs>; | ||
| /// use constructor parameter instead of '_init' parameters | ||
| new(...args: ConstructorParameters<T>): RegisteredPrototype<P, Props, IFaces<Interfaces>, Sigs>; | ||
| } | ||
| : never; | ||
| T extends ConstructorType, | ||
| Props extends { [key: string]: GObject.ParamSpec }, | ||
| Interfaces extends { $gtype: GObject.GType<any> }[], | ||
| Sigs extends { [key: string]: GObjectSignalDefinition } | ||
| > = T extends { prototype: infer P } | ||
| ? { | ||
| $gtype: GObject.GType<RegisteredClass<T, Props, IFaces<Interfaces>, Sigs>>; | ||
| prototype: RegisteredPrototype<P, Props, IFaces<Interfaces>, Sigs>; | ||
| /// use constructor parameter instead of '_init' parameters | ||
| new(...args: ConstructorParameters<T>): RegisteredPrototype<P, Props, IFaces<Interfaces>, Sigs>; | ||
| } | ||
| : never; | ||
|
|
||
| export function registerClass<T extends ConstructorType>(klass: T): RegisteredClass<T, {}, [], {}>; | ||
| export function registerClass< | ||
| T extends ConstructorType, | ||
| Props extends { [key: string]: GObject.ParamSpec }, | ||
| Interfaces extends { $gtype: GObject.GType }[], | ||
| Sigs extends { [key: string]: GObjectSignalDefinition } | ||
| T extends ConstructorType, | ||
| Props extends { [key: string]: GObject.ParamSpec }, | ||
| Interfaces extends { $gtype: GObject.GType }[], | ||
| Sigs extends { [key: string]: GObjectSignalDefinition } | ||
| >( | ||
| options: { | ||
| GTypeName?: string; | ||
| GTypeFlags?: GObject.TypeFlags; | ||
| /// Make properties mandatory | ||
| Properties: Props; | ||
| Signals?: Sigs; | ||
| Implements?: Interfaces; | ||
| CssName?: string; | ||
| Template?: string; | ||
| Children?: string[]; | ||
| InternalChildren?: string[]; | ||
| }, | ||
| klass: T | ||
| options: { | ||
| GTypeName?: string; | ||
| GTypeFlags?: GObject.TypeFlags; | ||
| /// Make properties mandatory | ||
| Properties: Props; | ||
| Signals?: Sigs; | ||
| Implements?: Interfaces; | ||
| CssName?: string; | ||
| Template?: string; | ||
| Children?: string[]; | ||
| InternalChildren?: string[]; | ||
| }, | ||
| klass: T | ||
| ): RegisteredClass<T, Props, Interfaces, Sigs>; | ||
|
|
||
| export function registerClass(...args: any[]): any { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -106,7 +106,7 @@ export class AltTabGestureExtension implements ISubExtension { | |
| if (this._extState === AltTabExtState.DEFAULT) { | ||
| this._switcher = new WindowSwitcherPopup(); | ||
| // remove timeout entirely | ||
| this._switcher._resetNoModsTimeout = function () { | ||
| this._switcher._resetNoModsTimeout = function() { | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. format file |
||
| if (this._noModsTimeoutId) { | ||
| GLib.source_remove(this._noModsTimeoutId); | ||
| this._noModsTimeoutId = 0; | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to gnome-shell