Commit graph

231 commits

Author SHA1 Message Date
Tomas Agustin Raies 670033c4da
[Settings/Run] LowLevel Keyboard hooking for Hotkeys (#3825)
* [Launcher/Settings] Low Level Keyboard Hooks

* [Run] LowLevel Keyboard Hook for Hotkeys

* Prevent shortcuts from auto repeating when keeping the keys pressed down
2020-06-11 12:59:36 -07:00
Arjun Balgovind fa7e4cc817
Tweaked OS Detection project structure and added os check for PT Run (#4253)
* Tweaked OS Detection project structure and added check in Launcher

* Reverted formatter change to minimize diff
2020-06-11 11:47:15 -07:00
vldmr11080 b0a25f59d9
[Installer] Restart explorer.exe programatically after successful update (#4215)
* Restart explorer.exe programatically after successful update

* Move RestartManager related code into common

* Add newline at the end of files

* Note that explorer.exe should not be localized string
2020-06-11 10:09:06 +02:00
Enrico Giordani e6408a0c37 [runner] Change way of dropping privileges to start PT Run 2020-06-05 10:35:11 +02:00
Josh Soref c2c163ac4e
Spelling: ... common (#3781)
* spelling: alignment

* spelling: awareness

* spelling: background

* spelling: bottom

* spelling: buttons

* spelling: comparison

* spelling: cortana

* spelling: exiting

* spelling: initialization

* spelling: middle

* spelling: properly

* spelling: succeeded

* spelling: unknown
2020-05-27 16:58:47 +02:00
Josh Soref 30dff09d7e
spelling: toggle (#3749) 2020-05-26 20:12:20 +02:00
Clint Rutkas 85f7d19eb2
upgrade to cppwinrt after the last merge conflict (#3745) 2020-05-26 10:53:46 -07:00
Josh Soref 4a03756b5b
Spelling: ... (#3398) 2020-05-26 17:02:36 +02:00
Clint Rutkas b6307b4fd6
Nuget updates (#3683)
* Sync'ing nuget packages. more to do

JSON, islands

* updating sql and oledb

* upgrading to 2.0 RTM for MahApps

* consolidated Microsoft.NETCore.UniversalWindowsPlatform

* updating Microsoft.Windows.ImplementationLibrary

* Microsoft.Windows.SDK.Contracts
2020-05-26 07:42:04 -07:00
Andrey Nekrasov bc9add783c
sln: specify WinSDK version for cpp projects (#3728) 2020-05-26 17:00:09 +03:00
Andrey Nekrasov c923e96f3e
sln: do not use PCH on CI (#3106) 2020-05-25 10:59:05 +03:00
Enrico Giordani a856263081
[PowerToys Run] run non-elevated when runner is elevated (#3451)
* run Launcher non-elevated

* Implemented acquiring PID of Launcher

Co-authored-by: ivan100sic <ivan100sic@gmail.com>
2020-05-21 19:44:32 +02:00
ryanbodrug-microsoft 34f814717b
Adding privacy event tags to each telemetry event. (#2879)
* Adding privacy event tags to each telemetry event.

* Moving Privacy events to Telemetry base, Removing tag values, and fixing namespaces.

* Adding documentation comments to fix style cop errors in release

* UTCReplace_AppSessionGuid boolean property to all C# telemetry events.

* Adding hardcoded version number to boot events.

* Adding reference to telemetry in settings unittest

* Adding Preview Pane events for loading w/ hardcoded version number

* Adding telemetry.h to msi for svg and markdown events

* removing unused explicit interface exception
2020-05-15 09:08:39 -07:00
Arjun Balgovind 9d5990311f
Fixed overflow in Type Shortcut (#2930)
* Fixed overflow in Type Shortcut

* hide the stackpanel if it is not required

* changed loop
2020-05-14 09:23:51 -07:00
Arjun Balgovind 58f1a8e916
Fix failing build pipeline (#2932)
* Add extra libpath load statement

* Add QSpectre flags on Release

* Revert cmd change

* Added spectre flag for debug

* added flag for more projects
2020-05-12 20:52:02 -07:00
Alekhya 62d9735a7e
[Settings] Add Image Resizer Settings hyperlink on feature detection of older OS Versions (#2868)
* Added the settings hyperlink code back

* Moved the os detection code to a different file so that it can be imported by image resizer

* Added code to the Image resizer project to react to import the dll

* Added an empty dll project

* Added a dll which can be imported by image resizer

* ImageResizer binding works

* Added the setDllDirectory to load the os-detection dll

* Removed the OS detection files that has been added to the common project

* Added reference to os-detect and removed reference to common/OS-Detection.h

* Modified project files

* Revert "Modified project files"

This reverts commit 75f9d73f30.

* Removed unnecessary showAdvanced bool variables

* Removed OS Detection code from common project

* Cleaned configuration properties of soln and projects

* runner is dependent on os-detection

* Added the os-detection.dll to wxs file

* nit space formatting

* Added reference to os-detection

* Added os-detection header file

* Add os-detection reference

* Added os-detection.dll

* removed the set dll directory and using relative paths instead

* Add relative path
2020-05-12 09:58:29 -07:00
Andrey Nekrasov 69cde6092b
build: use x64 platform for *Telemetry projects (#2895) 2020-05-12 15:27:19 +03:00
Arjun Balgovind 7551509f41
Fix inconsistent landing page remap list (#2866)
* Added pre-processing code

* Refactored code on c++ side to match

* Fixed comment
2020-05-11 17:18:12 -07:00
Tomas Agustin Raies 1056dac070
Add WIL to common-md-flag nuget packages (#2780) 2020-05-07 12:02:37 -07:00
Andrey Nekrasov 73c6cbb562
wix: install dotnet 3 after installation if needed (#2775) 2020-05-07 17:39:32 +03:00
Yevhenii Holovachov febacfcb79
Added informaton to notifications dll (#2687)
Added informaton to notifications dll
2020-05-07 12:01:01 +03:00
ryanbodrug-microsoft ba5d53914e Merge branch 'dev/build-features' into merge/build-features-to-master-05062020 2020-05-06 19:32:10 -07:00
ryanbodrug-microsoft 1f9c1ce8e4 Removing unecceary EventName requirement. EventSource<T>.Write will use the type name of T if null is passed in. This saves us passing an extra string uneccesarily as the public property would be serialized into the event data as well as being specified as the EventName 2020-05-06 15:10:22 -07:00
ryanbodrug-microsoft def0d7a519 Small refactor to use common powertoys telemetry event source accross modules. 2020-05-06 15:10:22 -07:00
ryanbodrug-microsoft 2b158c2b4e Removing unused reader namespace from telemetrybase. 2020-05-06 15:10:22 -07:00
ryanbodrug-microsoft 07cf527ddf Moving TelemetryBase to common/Telemetry to be referenced for all Managed Telemtry hooks. 2020-05-06 15:10:22 -07:00
ryanbodrug-microsoft 640fade438 merge master 2020-05-06 00:49:46 -07:00
Tomas Agustin Raies 7fc140af01
[Settings] Update version in General Settings (#2601)
* Update version in General Settings

* Set version in settings.json file

* Only overwrite the settings.json file if it is newer than the old version.

* Fix tests

* Fix test names and added comment
2020-05-04 14:40:32 -07:00
Arjun Balgovind d401474981
Add post-build event for publishing Launcher (#2561)
* Added post build script

* Added comments

* Added unset statement

* Added debug checks

* added more debug statements

* Added dir and cat statements to check pipeline output

* revert installer change

* Moved nuget package reference from update to include

* Removed debug cat command

* Removed debugging statements

* Added build script for launcher

* Added launcher scripts

* Removed launcher scripts

* Fixed interop folder and added hacked powerlauncher script

* Added publish only for Release
2020-05-04 13:30:38 -07:00
Arjun Balgovind 8cb134f56b
Add post-build event for publishing SettingsV2 (#2473)
* Added post build script

* Added comments

* Added unset statement

* Added debug checks

* added more debug statements

* Added dir and cat statements to check pipeline output

* revert installer change

* Moved nuget package reference from update to include

* Removed debug cat command

* Removed debugging statements

* Added build script for launcher

* Added launcher scripts

* Removed launcher scripts

* Changed taskkill to throw error

* Added back old config properties
2020-05-01 13:17:30 -07:00
Nghia M. Luong c768b6bd0c
Remove unused headers (#2471) 2020-04-30 20:14:33 +03:00
Rafael Rivera d16ebba9e0
Move from sdk-provided cppwinrt-1.x to cppwinrt-2.x nuget package (#2246) 2020-04-29 22:02:18 +02:00
Tomas Agustin Raies d9c4abe0df
Merge PowerLauncher branch (#2345)
* minor modifications in README

* Added launcher project and changed references to common

* Added the code to launch another process

* added shellapi header

* Added launcher to runner

* added functions to remove the abstract class error

* added the wox launcher dll

* Readded the reference to common

* modified the additional include directories for the release version

* changed the name to be displayed from Wox.Launcher to Launcher

* Localized the strings of Launcher

* Added a SearchResult Helper class

* Created a helper class to use indexer and return search results

* Added the main and settings file which declare most of the plugin interfaces

* Added references and renamed a class

* Added the images folder which contains the windows indexer icon

* Added the image

* Added the plugin.json file

* Minor changes in project files

* Added plugin.json to the project

* Modified the output paths to create the dll for the plugin in the correct location

* Refactored the code to make it unit testable

* Made the code unit testable and added unit tests for the indexer plugin

* Removed commented out code

* Code to terminate wox when we exit PowerToys

* Copy from Jeremy's fork PR

* Removed unnecessary plugins from source tree

* add missing files

* Fix postbuild event

* Added x64 for all Wox project - Debug mode

* Removed the AnyCPU config - Debug

* Added the build paths for release x64 (removed AnyCPU)

* Set warning level to 4 : Release

* Set warning level 4 : Debug

* set optimize code to false

* Removed notify icon component

* Removed setting UI XAML file and references

* Readded necessary callback functions

* Removed python path and python plugin functions

* Removed UI related to python path and the bindings related to that

* Remove python bindings

* Removed the localized string translations from pythonDirectory and SelectPythonDirectory

* Manually resolving conflicts

* Fix Wox build in project settings

* deleting unused project files

* Undo change internal

* Fix internal variable

* All wox exceptions in debug are getting rethrown, and thus causing the app to crash.  This change removes the debug specific code and allows exceptions to be handled the same was as release.

* Ported Indexer plugin to .net core 3

* Added the test project back

* Removed the .net framework indexer folder

* readding the plugin.json file

* Changed the anyCPU config to x64 for windows indexer plugin

* Adding dependency to wox project on the runner.  This should make sure the wox.exe can be build and launched by the runner so wox can run as a background process.

* Updating build dependencies.  Wox.Launcher wasn't built as part of the F5 Experience, and nor were the plugins

* removing locks from the ResultListBox code behind file.  All callbacks are accessed from the Main/UI thread.

* Remove anyCPU config and changed it to x64

* Removed anycpu of test proj

* Adding dependency

* Renaming executable to PowerLauncher.  Replaceing icons with placeholder. Deleting Docs folder

* Renaming AppData directory from 'Wox' to 'PowerLauncher'.  Also replacing issue link with powertoys github.

* adding support for xaml islands

* Added Neils UI code

* Replace Niels Code references

* Added assets and behaviours

* Add missing reference

* Add main view model binding

* Using proper executable name when closing 'PowerLauncher' process

* changed x:bind to Binding to avoid reference

* Updated bindings for launcher

* Added binding on searchBox

* Adding Directory.Build.targets file to kill the PowerLauncher pprocess on Build or Clean operations of all 'Launcher' projects.

* Fixed exception preventing result display

* Fixed issue with wpf marshalling events to a non UI thread

* Optimised result binding by inserting search result from multiple plugin in parallel

* copy resource files to output folder

* Corrected the output path for the indexer plugin

* windows indexer plugin is working

* Remove console print statement

* Added callback function for mouse click on search result

* Working App execution

* Cherry picked pinyin performance changes from jjw24's master branch

* change nuget package to msft for winrt compat

* Working up/down arrow key

* updating references and removing a few that seem uneeded for how stuff is referenced

* adding two back in

* Removing Squirrel dll.  unsure on updating so i kept that logic in

* Updated functionality on suggestion chosen in autosuggestbox

* Added the <useWPF> tag to remove the warning

* Removed an unnecessary <useWindowsForms> tag

* Removed the item group for properties from calculator plugin

* Removed the item group for properties from folder plugin

* Removed the item group for properties from indexer, program and shell plugin

* Removed itemgrp from wox.core and wox.test csprojs

* Removed the unnecessary wox files to clean up codebase

* Renamed Wox.Plugin.Indexer to Microsoft.Plugin.Indexer

* Renamed Wox.Launcher to Microsoft.Launcher

* To avoid DBNull to String typecast exception

* Added query submitted event to handle default action on clicking a list view item

* Merge pull request #42 from microsoft/AddPinyinPerformance

Cherry picked pinyin performance changes from jjw24's master branch

(cherry picked from commit b9e437c6cd)

* Rectyfying title display

* Title display working correctly

* Removed .yml files

* adding checks

* Making wox.csproj build wox assembly instead of powerlauncher

* Removing update logic from PowerLuanch App.xaml.cs as was done in Wox project.

* Making Query internals visible to wox.

* Update Powerlauncher nuget packages to be same version as wox.csproj.   Note:  FoxyWeavers.xsd change is automatically done as part of nuget package update.

* Updating build dependencies to so that wox.launcher depends on powerlauncher.csproj not wox.csproj

* Removing 'Wox' branded logos from powerlauncher.csproj as was done previously or wox.csproj

* Downgraded the library to the latest stable version

* single thread execution of the indexer plugin and InvalidOperationException due to connection being closed on ExecuteReader, handled separately

* Modified the test, the connection need not be null after being disposed. There is no direct way of checking if an object has been disposed other than to throw the InvalidOperationException

* Removing x86,ARM,ARM64, build configurations, as these were added accidentally when adding xaml island support.

* Removed STAThread

* Modified the output folder produced

* Renamed the dll produced

* Added dependency on PowerLauncher to the Microsoft.Launcher project

* modified the name of the dll in the indexer plugin

* Ignoring 128 errors from taskkill, as this means the process isn't running. We don't want htis to show up in the warnings list on build

* Added fix for closing wox on pressing escape and app execution (#75)

* adding useWPF to get rid of warning

* Launcher resize issue on selecting search result (#77)

* Added fix for closing wox on pressing escape and app execution

* Added fix to prevent autosuggestbox resize

* Fixing xaml catastrophic failure, based on Miguels suggestion here: https://github.com/windows-toolkit/Microsoft.Toolkit.Win32/issues/210

* suggested fix

* removing unused mutex string

* Searches for keyword only in title and not content to improve the quality of results

* Display the title from System.Title directly instead of extracting it from the path

* Removed additional README instructions before moving to the powerToys repo

* Fix Query builder test (#86)

* Revert base viewModel class to fix tests.

* Removing unused post build and deploy scripts.

* tweaked url

* Update plugin.json

* Update README.md

* removed unused dep (#2080)

* removed reference to everything (#2133)

* SearchIndexer - Modifying QueryContentProperties and QuerySelectColumns to use System.FileName

* Search result thumbnail for PowerLauncher (#2124)

* Replace WPF Imaging library with UWP

* Removed UWP and WPF namespace conflicting files from Wox

* Removed Image hashing as it wasn't used anywhere

* Updated formatting

* Set MainViewModel visibility to hidden on startup

* Enable CI build on PowerLauncher Branch (#2181)

* Enable CI build on PowerLauncher Branch

* Updated Nuget restore to latest and added AssetTargetFallback property

* tweak text (#2177)

* [Window Walker] Migrate to Launcher (#2093)

* Copy the existing calc. plugin foldeR

* Blindly rename a bunch of things to Window Walker

* Update the solution to reference the new plugin

* Get basic Yo returned

* Remove all the languages except english

* Lower quality of icon as well as test showing it

* Add the core non-ui parts to the plugin

* Delete calculator png

* Get it to compile

* Added the actual code which apparently doesn't work

* Finally start showing results

* Fix up strings

* Switch working

* Remove unused classes

* Remove unneeded async

* Added MSI support for Launcher (#2242)

* Fixed typo in output folder of calculator plugin

* Calculator plugin works

* Modified the name of the image to remove space as space is assumed to be a separator in wcx file

* Fixed typo in calculator dll

* Fixed typo in calculator plugin

* Shell, Program, Folde and indexer plugin working

* Added the ww plugin

* Fixed typos in the calculator plugin

* Delete file that was added unintentionally

* revert calculator rename changes

* Reverted other files changed

* Reverted renaming of file with space

* Pull changes from master to dev/powerLauncher (#2255)

* Dpi unaware placement bug (#2121)

Fix for bug when placing dpi unaware window such as Notepad++ in left of right part of monitor. In that application gap of about 7px was left or right.
This fixes only single-monitor scenario
It skips correction for dpi unaware window that leaves a gap

* Move markdown parsing logic outside control thread (#2099)

* Move markdown parsing logic outside control thread

* Update MarkdownPreviewHandlerControl.cs

* Remove trailing whitespace.

That'll teach me for trying to make an edit from the GitHub page.

* Migrate power rename MRU lists from registry to JSON (#2090)

* Handle most recently used search/replace strings within settings.

* Check for last modified time of json file and reload it if needed.

* Handle changes in MRU search / replace lists size.

* Improve handling of changes in MRU list size.

* Don't check for last modified time in every getter method. Load only when starting application.

* Add const identifier to getter methods.

* Address PR comments: Add const to reg and json file paths and set them in constructor initializer. Check pushIdx validity. Move implementation to cpp of PowerRenameUI constructor.

* Add error checking when getting values from registry.

* Implementing changes suggested in #1992 (#2116)

* Implementing changes suggested in #1992

* Update Product.wxs

Co-authored-by: Ebenezer Ewumi <ebenezer.ewumi@wsu.edu>

* Fix for issue #1532 - [PowerToys tray icon] Show version on tooltip (#2117)

* Fix for issue #1532

[PowerToys] Show version on tooltip

* Update src/runner/tray_icon.cpp

Co-Authored-By: Andrey Nekrasov <yuyoyuppe@users.noreply.github.com>

Co-authored-by: Andrey Nekrasov <yuyoyuppe@users.noreply.github.com>

* FZ editor: Splitted zones positioning (#2158)

* Added a mutex to ZoneWindow, ensured no data races occur (#2154)

* Added a mutex to ZoneWindow, ensured no data races occur

* Protected draggedWindow* members with a mutex

* Ensured that critical reads happen in a single transaction

* Dpi unaware placement bug - multimontior with same DPI settings fix (#2156)

* Dpi unaware placement bug - multimontior with same DPI settings fix

* Using different enumerating method

* Changed AllMonitorHaveSameDpiScaling method

* Removed accidental file

* small rename

* Changed some methods to CamelCase

* Review comments fixes

Co-authored-by: PrzemyslawTusinski <61138537+PrzemyslawTusinski@users.noreply.github.com>
Co-authored-by: Ben Randall <veleek@gmail.com>
Co-authored-by: vldmr11080 <57061786+vldmr11080@users.noreply.github.com>
Co-authored-by: eduardodextil <55205162+eduardodextil@users.noreply.github.com>
Co-authored-by: Ebenezer Ewumi <ebenezer.ewumi@wsu.edu>
Co-authored-by: Nghia M. Luong <32159519+sqrlmn@users.noreply.github.com>
Co-authored-by: Andrey Nekrasov <yuyoyuppe@users.noreply.github.com>
Co-authored-by: Seraphima Zykova <zykovas91@gmail.com>
Co-authored-by: Ivan Stošić <ivan100sic@gmail.com>

* Somil55/merge custom ui into launcher (#2271)

* Remove Autosuggest box (#2192)

* Update Settings.Designer.cs

* Revert "Update Settings.Designer.cs"

This reverts commit a1bc0dda56.

* Updated LauncherControl XAML to add textbox and listview

* List View displayed

* Hooking up execution on the selected index, removing two way binding on selection, and experimenting with popup that doesn't work

* Updated MainViewModel to Remove context menu and history

* Added Resultist XAML Island project

* Updated SelectedItem and SelectedList Binding.
Issues :  List box doesn't open when query is written for first time but opens in subsequent queries.

* 1. Mouse Click working
2. List View is can't be focused
3. Fixed width of Launcher

* Removed two way QueryText box binding

* Removed SelectedItem two way binding and replaced with a callback

* [Cleaning] Remove redundant UWP project

* [Cleaning] Updated files to keep only atomic changes against dev/powerLauncher

* Thmbnail fixed for NEW UI

* Removed PreviewMouseDown function required by older WOX code

Co-authored-by: ryanbodrug-microsoft <56318517+ryanbodrug-microsoft@users.noreply.github.com>

* Added the auto-complete feature

* Removing ContextMenuPluginInfo, and ContextMenuTopMost as these commands are not used int the new design.

* Fixed merge conflicts

* Set only when index is 0

* One way binding

* Removed unnecessary binding

* Deleting unused (commented out code) that was legacy from wox project.

* Binding Buttons to appropriate context menu commands.
1. Buttons are dynamically loaded in a listview based on the actions supported be each plugin.

This change also deletes unused commands.

Note:  Most button events don't seem to be getting routed to the Selected Item.  Currently using 'PointerEntered' to validate the behavior.  The actions should be trigged by the button command property in the future.

* manually handling tab in mainwindow

* Loading context buttons on Selecting a suggestion list item

* Allowing hover event to load content menu items and display them as well.

* Adding context buttons to Indexer plugin.  This allows for the following:
1. [Files] Open Containing folder
2. [Folders/Files] Copy Path

* Remove White background of list (#2218)

* Remove white background of list

* Removed comments

* Changed to ContainerContentChanging event

* add const variables instead of numbers

* Added comment before the updatelistSize function

* Search box UI (#2224)

* Added backdrop and rounded corner

* Fix for two alt+space press to bring searchbox issue

* Fixed merge conflict

* Clean Mainwindow.xaml code

* Fix for textbox focus on first visible

* Allowing users to tab between the context buttons for the selected resut.  Also allowing users to press 'enter' to action on the selected items.

* Renaming SelectedIndex to ContextMenuSelectedIndex

* Enabling key accelerators on context buttons.
1. Add new object ContextMenuResult instead instead of reusing Result for both query results and context menu results.
2. Binding KeyboardAccelerator keys to contextmenuitemviewmodel
3. Enabling and disabling contextmenu items when selecting or deselecting each row.  Because we are manually maintaining selectionwe can't use ScopeOwners as the textbox is really the only item ever in focus.

* Launching explorer instead of the UWP application when selecting 'open file location'.

* Added fix for border showing up when result count is zero

* Updated fix for border on no result

* Adding visibility  after clearing result in MainViewmodel

* Launcher Light/Dark mode (#2235)

* Fixed issue with list view background not updating with Windows theme change

* Added theme change for WPF

* updated ShadowDepth for dropshadow

* Updated border thicknes of searchbox and listview

* Diff issue with ResultList.xaml

* Removed change in result delay

* Added code to pull colors from UWP

* Updated border resource to use system based SystemControlHighlightAccentBrush

* Updated corner radius in dark mode

* Updated Launcher description text

Co-authored-by: ryanbodrug-microsoft <56318517+ryanbodrug-microsoft@users.noreply.github.com>
Co-authored-by: Alekhya Reddy <reddykalekhya@gmail.com>

* Changed to SystemChromeLow from Accent brush (#2272)

* Removed ListView animations

* Positioning ContextButtons and adding background.

* Disabling scrollbars for gridview items.

* Removed folder plugin

* removed deployment for uwp apps (#2298)

* Simulating Win+backspace key press, instead of Win+Control as it was launching WW (#2250)

* text is selected whenever launcher gets hidden and is then set to visible (#2315)

* Update nuget packages across solution to latest (#2334)

* simplifying the xaml and making things tighter (#2327)

* Setting runcommand as the default execution method, and turning off run as admin by default.

* Opening explorer if the user has types a file path.

* Enable PowerLauncher toggle

* Launcher MSI - Added a required dll and removed folder plugin (#2355)

* Modified the product.wxs file

* Added the x64 config

* Modify scoring algorithm for fuzzy search (#2361)

* Modify scoring

* modified to if else

* Fixes race conditions with PointerEnter/Exit events conflicting with Selection and unselection.   This change provides better encapsulation of the logic to enable a selected item for accelerator (hotkey) events, and allow mouse input on results where the pointer is over.

* Fixes an issue where PointerExit would hide the selected context buttons.

* Result List - Bad rebase overwrote margin and translation fields.

* Fixed process executing on clicking enter if no text in search box

* Codeflow cleanup when selectedItem is not null

* adjusting how programs are displayed. (#2369)

* Removing description from title

* adjusting subtitle

* removing accidently paste

* removing desc for uwp apps

* Revert "Removed folder plugin"

This reverts commit 064d638588.

We will use the folder plugin to better mimic the way the start menu and run prompt deal with directories

* Updating JetBrains.Annotations to 2020.1.0 to be consistent with other projects.

* Replacing submenu text with full path as 'Ctrl-Enter' doesn't do anything.  Also reducing the String of CreateOpenCurrentResult to fit in one line.

* - Making Open Directory subtitle fixed, and the title as the current directory.

* Adding back binding to QueryText and updating the cursor position similar to how wox originally did it.

* Add the folder plugin wxs back in (#2374)

* Deduping results for program plugin (#2375)

* Removing description from title

* adjusting subtitle

* removing accidently paste

* removing desc for uwp apps

* Getting dups removed from list if LNK exists

* adjusting subtitle

* removing accidently paste

* Getting dups removed from list if LNK exists

* changed to normal forloop

* Removing WinR (#2381)

* Updated program execution to call action on background thread. (#2370)

* PowerLauncher Settings integration

* Added cold start fix (#2385)

* - Fixes cursor jumping around issue.
- Seperating the ability to set the text from initiating a query.
- Plugins have to explicitly request the query be updated.
- Updating Folder plugin to explicty update the query on folder selection.
- Removing unused changes from 'Wox' that don't compile.

* Fixing gap in logic where query was triggering when programatically setting text.

Updating the binding and settext both will trigger the TextChanged event on a seperate event dispatcher.  For this reason we dynamically detect which eventhandler is most approapriate on the textchanging event.

* Updating the QueryText to the selected item when navigating up/down with the  arrow keys.

* Removing action on folder result, and displaying folder path on selecting a folder result from the folder plugin.

* Making folder results from the search indexer plugin behave like folder results from folder plugin.

* Folder Results open the explorer window when selected.

* The Open Current Folder result shouldn't change the query text to 'Open {folder path}' when selecting the results.

* Initializing query text strings.

* Defensive check for QueryText being empty

* Adding file watchers for UWP detecting when apps are installed or deleted and reindexing the uwp apps

* Removing unused namespace.

* Looking at files and not filtering is better because the timer is more likely to reset while an install is happening, preventing uneeded indexing

* Fix project references

* Fix MaxResultsToShow

* Fix Alt + Space display

* Fix settings defaults

Co-authored-by: Alekhya Reddy Kommuru <reddykalekhya@gmail.com>
Co-authored-by: bkudiess <bakudies@microsoft.com>
Co-authored-by: Divyansh <somm14divi@gmail.com>
Co-authored-by: ryanbodrug-microsoft <56318517+ryanbodrug-microsoft@users.noreply.github.com>
Co-authored-by: Barbara Kudiess <bkudiess@me.com>
Co-authored-by: Jeremy Wu <jeremy24wu@gmail.com>
Co-authored-by: Clint Rutkas <clint@rutkas.com>
Co-authored-by: udit3333 <udit3333@gmail.com>
Co-authored-by: Betsegaw (Beta) Tadele <betsegaw.ta@gmail.com>
Co-authored-by: PrzemyslawTusinski <61138537+PrzemyslawTusinski@users.noreply.github.com>
Co-authored-by: Ben Randall <veleek@gmail.com>
Co-authored-by: vldmr11080 <57061786+vldmr11080@users.noreply.github.com>
Co-authored-by: eduardodextil <55205162+eduardodextil@users.noreply.github.com>
Co-authored-by: Ebenezer Ewumi <ebenezer.ewumi@wsu.edu>
Co-authored-by: Nghia M. Luong <32159519+sqrlmn@users.noreply.github.com>
Co-authored-by: Andrey Nekrasov <yuyoyuppe@users.noreply.github.com>
Co-authored-by: Seraphima Zykova <zykovas91@gmail.com>
Co-authored-by: Ivan Stošić <ivan100sic@gmail.com>
2020-04-28 15:06:01 -07:00
Arjun 96b2145ba1 Merge branch 'master' into dev/build-features 2020-04-27 08:42:42 -07:00
Andrey Nekrasov ce4643d650
runner: autoupdate improvements (#2346) 2020-04-27 13:39:47 +03:00
Arjun Balgovind 38ecc82e97
Improve warnings for KBM (dev/build-features) (#2386)
* Handled invalid input for single key remaps

* Added some functions

* Added better error message functions and finished warnings for edit keyboard

* Updated dropdown order of keys

* Added new warning template for shortcuts

* Added show warning on Apply code

* Removed old flyout code

* Fixed issue where tooltips were replaced on Apply

* Simplified == operator
2020-04-26 15:09:40 -07:00
Tomas Agustin Raies 63d989cab4
Deprecate ATL based IPC wrapper library (#2248)
* Deprecate ATL based IPC wrapper library

* C# projects now use named pipe server implementations from two_way_pipe_message
through the interop C++/Cli library.

* Added Unit testing to interop library
2020-04-23 17:11:02 -07:00
Arjun Balgovind 32ddf3246c
Add support for Common Win key in KBM (#2308)
* Added common win key to layoutmap

* Added common win key support for edit shortcuts

* Adjusted key names
2020-04-23 08:37:52 -07:00
Arjun ca3a436fe5 Merge latest master: 4/22/20 2020-04-22 10:02:17 -07:00
Arjun Balgovind 394f52a725
Fix issue where key list would change based on keyboard state (#2221) 2020-04-21 13:43:52 -07:00
Tomas Agustin Raies 7856495d59
Fix compilation problems related to the Interop project (#2290)
* Added missing c++17 compile flag to common-md-flag
* Remove .NET native tool chain from Settings.UI release config
* This flag has to be removed because .Net Native does not support
  mixed assemblies, like PowerToysInterop.
2020-04-21 12:55:04 -07:00
Arjun Balgovind b715a008c5
Fixed KBM interaction with Shortcut Guide (#2220) 2020-04-21 10:25:14 -07:00
Andrey Nekrasov 0354026292
runner: initial automatic update (#2141) 2020-04-21 10:30:12 +03:00
Tomas Agustin Raies 93752fb6cb
Display Unicode character for keys in HotkeySettingsControl (#2249)
* Fix HotkeyControl virtual key display

* A new interop project was setup to provide wrappers for C# projects
  that want to access functionality in the common project.

* Add assembly info

* Remove WIN32 configurations
2020-04-20 21:01:21 -07:00
Arjun 62bae55fd1 Merge branch 'master' into dev/build-features 2020-04-20 09:15:32 -07:00
PrzemyslawTusinski dcee505f6b
Dpi unaware placement bug - multimontior with same DPI settings fix (#2156)
* Dpi unaware placement bug - multimontior with same DPI settings fix

* Using different enumerating method

* Changed AllMonitorHaveSameDpiScaling method

* Removed accidental file

* small rename

* Changed some methods to CamelCase

* Review comments fixes
2020-04-20 18:09:10 +02:00
Udit Singh 5d9b71b038 Merge Master Latest: 4/15/20 2020-04-15 07:55:17 -07:00
PrzemyslawTusinski 2077cd4864
Dpi unaware placement bug (#2121)
Fix for bug when placing dpi unaware window such as Notepad++ in left of right part of monitor. In that application gap of about 7px was left or right.
This fixes only single-monitor scenario
It skips correction for dpi unaware window that leaves a gap
2020-04-15 12:34:11 +02:00
Andrey Nekrasov 86704efcec
FancyZones: optimize elevation detection logic (#2103) 2020-04-13 18:22:37 +03:00
Arjun Balgovind b713083574 Edit Shortcuts UI (dev/keyboardManager) (#1647)
* Added EditShortcuts Window and added Detecting shortcuts functionality

* Fixed build error

* Changed detection to take place only when window is in focus

* Added solution folder

* Added a common project and refactored shared variables to an object with wrapper functions

* Added dynamic addition of shortcuts

* Moved all shared variables in detection to state variable with wrapper functions

* Added code to re-load saved shortcuts in the UI

* Added comments

* Fixed argument modifiers in Helpers

* Updated arg modifiers in all functions

* Removed unused headers and added precompiled headers
2020-04-08 14:35:52 -07:00
Lavius Motileng 2a0e92e4e2 add two way IPC 2020-04-07 14:19:33 -07:00
Andrey Nekrasov 7cfe74b384
runner: implement automatic MSIX package uninstallation on startup (#1920) 2020-04-03 18:51:28 +02:00
PrzemyslawTusinski 90a228619e
Version helper compare operator fix (#1824)
* Version helper compare operator fix

* Simplyfy compare code
2020-04-01 13:30:21 +02:00
yuyoyuppe 60fa6071b9 FZ: warn w/ a toast if an elevated window cannot be dragged and offer learning more 2020-03-27 13:23:37 +03:00
Andrey Nekrasov 0c0dddab12
chore: fix WinRT-related warnings (#1710) 2020-03-26 16:31:59 +03:00
stefansjfw 1476395829
Enable non-ascii chars (#1669)
* Enable non-ascii chars

* Follow file naming policy

* Use stream read and write methods

* Remove obsolete close() calls

* Revert "Remove obsolete close() calls"

This reverts commit 7006bcb038.

* Revert "Use stream read and write methods"

This reverts commit ec06a1a05b.
2020-03-25 11:11:27 +01:00
Andrey Nekrasov e52c5d38d3
Cleanup project output/intermediate dirs (#1640)
* sln: set output dir prefix to "modules\" for all modules

* sln: CopyToOutputDirectory only when necessary

* sln: intermediate dir for csprojs

* sln: intermediate dir for vcxprojs

* sln: add PT as runner project deps + remove nonexisting project confs

* sln: remove AnyCPU for win-app-driver project
2020-03-20 21:41:48 +03:00
vldmr11080 ff0c021162
Check if settings file is open before parsing JSON content from it (#1616) 2020-03-18 11:17:57 +01:00
Clint Rutkas d8c1cb2629
fix for #1595 (#1598)
* fix for #1595

tweaking this fixed it.

* Update msi_to_msix_upgrade_lib.vcxproj
2020-03-16 14:43:58 -07:00
Yevhenii Holovachov 02857d1b7f
Some refactoring of FancyZones::IsInterestingWindow and added Unit Tests (#1521)
* Some refactoring of FancyZones::IsInterestingWindow and added UnitTests
2020-03-16 14:25:30 +02:00
Andrey Nekrasov 20e89f21ff
runner: only launch update threads when we know we won't be elevated and show windows for the child (#1537) 2020-03-12 10:59:10 +03:00
udit3333 83ce8a2197
[0.16]: Merge Preview Handlers in Master (#1516)
* Added project template for common library

* Added reference to stylecop.json

* Fixed xml documetation file path for common project

* Added reference to stylecop.json

* Added COM interface interpolations to C#

* Changed namespace to Common

* Added xml doc to com interfaces

* Removed AnyCPU configuration from solution file

* Added Preview Hander and form User Control Implementation

* Fix stylecop warnings

* Added test control and handler

* Added Xaml description for preview handler

* Added Xml documenatation

* Updated the control to form

* Added registration and unregistration logic for the handler

* Moved the files in separate folder and fix PR comments

* updated the name of previewhandler class to base class

* Added the DoPreview to PreviewHandlerControl Interface

* Modified the Dopreview and Unload as virtual method

* Uncommented the DocumentText to help bug repro

* HTML Parsing Extension for preview pane markdown renderer (#1108)

* Added Extension for html post processing

* Added unit test poroject for preview pane

* Added pipline test and base test function

* Added Tests for extension

* Added tests for url slashes

* Added tests for url and figure caption

* Markdown preview pane (#1128)

* Added Extension for html post processing

* Added unit test poroject for preview pane

* Added pipline test and base test function

* Added Tests for extension

* Added handler and control for markdown

* Tests added

* Locally working version for markdown

* Working image relative url's in markdown

* Added CSS to preview display

* Updates CSS for code block

* Removed html file write comment in markdown control

* Updated assembly version and web browser control test

* Add Svg preview handler (#1129)

* Added a new project for Svg preview handler

* Added initial implementation of Svg Preview Handler

* Fixed output path

* Added Unit Test Project

* Added StreamWrapper and Update Svg Control

* Updated Svg Handler Guid

* Removed migration backup folder

* Removed Fluent Assertions NuGet

* Added Comments for StreamWrapper

* Removed the manual GC collect

* Added unit tests for Svg preview Handler

* Updated the xml doc for stream wrapper

* User/lamotile/add_powerpreviewsettings (#1075)

* Added powersettings to PowerToys Settings UI

* added settings library

* updated settings-web

* updated project oncfiguration

* updated project onfiguration

* updated project .sln file

* removed .etl file and added it to git-ignore

* separated the PowerPreviewModule into split classes .cpp and .h

* moved PowerPreviewModule implemnetations to .cpp file

* fixed StringTable formatter

* fixed spacing in resource.h

* added m_ to member varibales

* initiliaze m_isPreviewEnabled in the base class

* removed duplication of objects by using pass by refference and std::move

* made the getters const

* updated naming convention

* Split test calsses

* Add const string

* Replaced move with const string

* Made attributes private

* Made attributes private

* removed unused constructor

* Update resource.h

formatted resource.h

* Adding unit tests for preview handler common (#1156)

* Changed the name of the Common library to PreviewHandlerCommon

* Added unit tests project for PreviewHandlerCommon

* Updated ComInterop accessor type

* Added unit tests for PreviewHandlerbase

* Added tests for file and stream based handler

* Added unit tests for StreamWrapper

* Added form handler unit tests

* Added Unit tests for FormHandlerControl

* Added file header

* Add Powerpreview project

* Add spacing in sln file

* swapped string refferences (#1199)

* added registry methods and enable/disable preview handlers (#1230)

* added registry methods and enable/disable preview handlers

* formatted .rc file.

* formatted resource file

* formatted .rc file.

* formatted settings.cpp

* formatted settings.h

* formatted SVGPreviewSettingsClassTest.cpp

* Formatted MarkDownPreviewSettingsClassTest.cpp

* using wide strings

* formatted settings.h

* FileExplorerPreviewSettingsTest.cpp formatting

* fixed typo and formatting

* closing Registry and fixing typos

* formmarted code using ctrl+k+d

* fixed naming

* fixed typo

* changed if/else reverse order

* Markdown preview pane  (#1220)

* Added rich text bar for information display

* Added infobar

* Added tests for extension and markdown control

* Added xml docstring for markdown preview handler control

* Updated assembly file for markdown preview pane

* Updated removal of script tag without modifying CSS

* Added info bar text string to resource file.

* Removed error with infobar display on first rendering

* Updated assembly version

* Remove script and image element from Svg (#1231)

* Added implementation to remove script and image tag

* Added Unit tests for SvgPreviewHandlerHelper

* Updated Unit tests for SvgPreviewControl

* Moved the hardcoded string to resource file

* Changed the LocalMachine to CurrentUser for preview handler registration

* Added unit tests for multiple blocked elements tags

* User/lamotile/update settings objects (#1263)

* added registry methods and enable/disable preview handlers

* formatted .rc file.

* formatted resource file

* formatted .rc file.

* formatted settings.cpp

* formatted settings.h

* formatted SVGPreviewSettingsClassTest.cpp

* Formatted MarkDownPreviewSettingsClassTest.cpp

* using wide strings

* formatted settings.h

* FileExplorerPreviewSettingsTest.cpp formatting

* fixed typo and formatting

* closing Registry and fixing typos

* formmarted code using ctrl+k+d

* fixed naming

* fixed typo

* changed if/else reverse order

* updated setiings_objects.cpp

* removed changes on files that are not part of this PR

* removed const ref on primative types

* updated pass by ref semantic and removed pas by reff on primative types

* fixed spaces in the commas

* fixed spaces in brackets

* Preview pane telemetry (#1299)

* Added telemetry base class and markdown telemetry class

* Updated docstring for telemetry event.

* Added telemetry to markdown for error

* Added try catch for markdown preview handler and display error bar

* Updated markdown telemetry to make event names global variable

* Updated parameter name to camel casing and telemetry event name naming.

* Corrected assembbly version for svg renderer

* Markdown Image files display (#1303)

* Added telemetry base class and markdown telemetry class

* Updated docstring for telemetry event.

* Added telemetry to markdown for error

* Added try catch for markdown preview handler and display error bar

* Updated markdown telemetry to make event names global variable

* Updated Markdown preview to display without vertical scrollbar and removed xml doc to html agility pack.

* Updated parameter name to camel casing and telemetry event name naming.

* Corrected assembbly version for svg renderer

* Removed duplicate function

* Add telemetry for Svg preview handler (#1314)

* Added telemetry events for Svg Preview Handler

* Added unit test in case preview handler throws

* Updated the Error event name

* Remove the not required return statement

* User/lamotile/add read me (#1332)

* add readme

* moved images

* re-added images'

* Fixed gramma

* Update figure number refference

* improve preview handler intergration (#1319)

* improve preview handler intergration

* Fixed typo

* updated typo

* updated enable() function

* updated is enabled()

* re-updated is enabled()

* added this-> key word

* (0.16) - Install preview handler with msix (#1339)

* Removed the registration logic from preview handlers

* Updated the output path

* Added logic to shim the activation of .net assembly

* Updated manifest file

* Fix the allowedsilenttakeover filed in manifest

* Updated the appxmanifest file

* Added AllowSilentDefaultTakeOver in manifest

* Fix returned error code by DllGetClassObject

* Moved the CLSID to a common header file

* Added info about where CLSID needs to be updated

* Added a .reg file for the Keys added in registry.dat

* Added comments for DllGetClassObject

* Svg Preview Handler block external component  (#1368)

* Removed the registration logic from preview handlers

* Updated the output path

* Added logic to shim the activation of .net assembly

* Updated manifest file

* Fix the allowedsilenttakeover filed in manifest

* Updated the appxmanifest file

* Added AllowSilentDefaultTakeOver in manifest

* Fix returned error code by DllGetClassObject

* Moved the CLSID to a common header file

* Added info about where CLSID needs to be updated

* Added a .reg file for the Keys added in registry.dat

* Added comments for DllGetClassObject

* Extended WebBrowserSite for setting flags in DISPID_AMBIENT_DLCONTROL

* Added XML Documenatation

* Removed the logic for deleting image and script element from Svg

* Updated Unit Tests

* Updated typecast of uint

* Forwarded calls to Type.InvokeMember

* Resolve PR Comments

* Adding MSI Installation for Preview Handler (#1436)

* Updated wxs for including dll and registry keys for preview handlers

* Changed the casing for registry key

* Resolve PR Comments

* Added comments for File element

* Call GC on preview unloading (#1456)

* Call GC collect on preview unloading

* Added github issue link

* Update Web browser control for Markdown Previewer (#1464)

* Updated Webbrowser control

* Updated Unit tests

* Disabled Navigation for Svg Previewer

* Fix power preview unit tests (#1508)

* Decoupled registry interaction logic

* Updated File explorer settings

* Updated unit tests for PowerPreview Settings

* Added Asserrtion for Scope of registry key

* Updated the registry value to match with installation registry value

* Sync master settings.cpp

* Merge settings changes from PreviewHandlers

* Remove newline changes added into in example_powertoy\trace.cpp

* Chaned .net framework to 4.7.2

* Updated Csproj files to auto generate Assembly.info files

* Updated msi installer to use version variable for preview handlers assembly

* Removed the signing of Assembly and updated wxs to not include PublicKeyToken

* Updated the Path in Packaginglayout.xml to modules from Gac and the registry hive binary

* Regenerated updated JS and html file

* Resolve PR Comments

* Readded the wprp file

Co-authored-by: Divyansh <divyan@microsoft.com>
Co-authored-by: Divyansh <somm14divi@gmail.com>
Co-authored-by: Lavius Motileng <58791731+laviusmotileng-ms@users.noreply.github.com>
2020-03-11 15:53:49 -07:00
Andrey Nekrasov db8472a6e5
Unify version specifying (#1439)
* installer: extract version number into separate file and use it where possible

* MSIX: rename package to include version on CDPx

* installer: generate assembly info for FZ editor

* MSIX: inject correct version to appxmanifest
2020-03-05 17:52:21 +03:00
Andrey Nekrasov cf1b53831f
Formatting chores (#1441)
* format_sources: exclude 3rd party sources

* format common project

* format leftovers in runner & settings projects

* move source formatting-related files according to #939
2020-03-05 13:07:06 +03:00
Enrico Giordani 8373204c94
Now working on 0.15.2 (#1432) 2020-03-04 05:52:16 +01:00
Enrico Giordani 6787af413e
Increment version to 0.15.1 (#1428) 2020-03-03 22:31:57 +01:00
yuyoyuppe 16b1bfa4d0 increment version to 0.15 🎉 2020-02-26 23:21:17 +03:00
PrzemyslawTusinski f015995ac4 Now updater is comparing versions instead of comparing thier strings 2020-02-26 23:06:44 +03:00
yuyoyuppe 0016836022 runner: periodically check if there's a new version available on github and offer a visit 2020-02-26 23:06:44 +03:00
yuyoyuppe c543b7585a notifications: add support for unpackaged apps and protocol activation 2020-02-26 23:06:44 +03:00
yuyoyuppe b90f1fc237 common: always use 0 for build number and make get_product_version return "vX.X.X" 2020-02-26 23:06:44 +03:00
Enrico Giordani 74b076e31f
[CDPx] update SDK, restore telemetry, build MSIX (#1358) 2020-02-24 23:49:28 +01:00
Yevhenii Holovachov 607a297c4a
"Always run as administrator" and "Restart as ..." only for administrator account (#1318) 2020-02-18 20:56:34 +01:00
Andrey Nekrasov 20519e3b81
MSIX: prompt and uninstall MSI PT version (#1248) 2020-02-18 18:11:01 +03:00
stefansjfw 53f830bb38
Migrate FancyZones data persisting from Registry to JSON file (#1194)
* Migrate FancyZones data persisting from Registry to JSON file

* Address PR comment: Remove redundant check

* Addres PR comment: Remove unused Dpi and add CmdArgs enum

* Address PR comment: Make methods const and inline

* Address PR comments: Expose GenerateUniqueId function and use const ref instead of passing wstring by value

* Address PR comment: Use lamdba as callback

* Address PR comment: Move GenerateUniqueId to ZoneWindowUtils namespace

* Address PR comment: Use regular comparison instead of std::wstring::compare

* Address PR comment: Use std::wstring_view for tmp file paths

* Address PR comment: Use scoped lock when accessing member data

* Address PR comment: Remove typedefs to increase code readability

* Address PR comment: removed nullptr checks with corresponding tests

* Address PR comment: Move ZoneSet object instead of copying

* Address PR comment: Make FancyZonesData instance const where possible

* Remove unnecessary gutter variable during calculating zone coordinates

* Remove uneeded subclass

* Avoid unnecessary copying and reserve space for vector if possible

* Save FancyZones data after exiting editor

* App zone history (#18)

* added window and zone set ids to app zone history

* Rename JSON file

* Remove AppZoneHistory migration

* Move parsing of ZoneWindow independent temp files outside of it

* Unit tests update (#19)

* check device existence in map
* updated ZoneSet tests
* updated JsonHelpers tests

* Use single zone count information

* Remove uneeded tests

* Remove one more test

* Remove uneeded line

* Address PR comments - Missing whitespace

* Update zoneset data for new virtual desktops (#21)

* update active zone set with actual data

* Introduce Blank zone set (used to indicate that no layout applied yet). Move parsing completely outside of ZoneWindow.

* Fix unit tests to match modifications in implementation

* Fix applying layouts on startup (second monitor)

Co-authored-by: vldmr11080 <57061786+vldmr11080@users.noreply.github.com>
Co-authored-by: Seraphima <zykovas91@gmail.com>
2020-02-10 14:59:51 +01:00
Bartosz Sosnowski 0fdc1d0a1f
ShortcutGuide, FancyZones: split window filtering (#1225)
Splits the code use to filter windows for FancyZones and the
"active window" for the ShortcutGuide. The FancyZones logic is preserved
and merged into a single function. We keep it in common.h, as it might
be also used in other PowerToys, like maximized to new desktop. We do
however change the return type to be more descriptive. It also returns
a separate flag for if the window has a visible owner. This can be used
to implement the approved apps list.

For the ShortcutGuide, the logic is relaxed to include more windows. One
example are Explorer properties windows. Those are (and should) filtered
by the FancyZones, but should appear in the window preview in the SCG.

The new return type also includes information if the window will react
to the default Windows Snap. This is not ideal though. Currently, SCG
can only disable the entire "Windows Controls" group. OTOH windows like
"Save As..." dialogs can be snapped to corners etc., but cannot be
minimized nor maximized. Until SCG can separately disable those buttons
we will display the buttons in the enabled state only if the window
supports all settings. In the future, we should integrate FancyZones
snap override here too.
2020-02-07 15:53:57 +01:00
Bartosz Sosnowski 09d1af9c46
Common: remove hwnd_data_cache (#1223)
The cache was introduced to improve performance by not querying the
OS for the window process path every time we need to check if the window
is interesting to FancyZones. Since then other changes were made to the
the way we check the windows. Right now, the IsInterestingWindow function is
called when:

  1) WinKey + arrows are used
  2) window is started to be dragged
  3) window is created

1) and 2) are initiated by the user, happen only once per interaction so
their performance impact can be dismissed. The 3) happens all the time
but for the most part the check for WS_CHILD or
GetAncestor(window, GA_ROOT) == window will filter those out. In the
end, only top-level windows will be queried for their path.

Removing the cache improves code readability and will make code
maintenance easier.
2020-02-06 18:04:10 +01:00
Bartosz Sosnowski 0ecfbfad53
FancyZones: filter out WM_POPUP windows if they dont have maximize/minimize button or a sizable frame (#1212)
This filters out TaskView and Win32 menus.
2020-02-05 12:31:35 +01:00
yuyoyuppe 5089729b18
MSIX: implement initial version of notifications library (#1178) 2020-02-04 19:41:00 +03:00
yuyoyuppe aa714f7d80
Runner: fix startup task state setting for MSIX (#1181) 2020-01-31 20:35:21 +03:00
yuyoyuppe 482ad0e5ee Settings: initialize COM security to allow communication between elevated Settings and WebView 2020-01-27 18:49:35 +03:00
yuyoyuppe cd6ac4f8c2 Common: implement on_scope_exit helper and typed_storage 2020-01-27 18:49:35 +03:00
Bartosz Sosnowski cc99abcd14
Runner: fix restarting with same elevation (#1133) 2020-01-23 15:12:02 +01:00
Alekhya Kommuru 23bba969dd Merge remote-tracking branch 'upstream/master' into locPowerRename 2020-01-20 11:54:20 -08:00
Bartosz Sosnowski 62da7c7be4
FancyZones: remove dialog boxes filtering (#1076)
* FancyZones: remove dialog boxes filtering

* FancyZones: add the "no owner window" filter to the WinKey + arrow zone snapping
2020-01-20 11:02:12 +01:00
Alekhya Kommuru 653a84d3a9 reverting formatting of files 2020-01-17 14:38:41 -08:00
Alekhya Kommuru 8132bbac2e updated formatting of common.cpp 2020-01-17 14:32:02 -08:00
Alekhya Kommuru df1c6b9b0b Removed get_res_string_wchar and used the get_resource_string() function instead which returns a wstring typecast into wchar* 2020-01-17 11:06:57 -08:00
Alekhya Kommuru bde0e0b86a Merge remote-tracking branch 'upstream/master' into locPowerRename 2020-01-16 13:58:59 -08:00
Arjun Balgovind c1232a7001 Shifted three functions to common (#1101) 2020-01-15 23:06:22 -08:00
Alekhya Kommuru 969abe015c added the helper functions 2020-01-14 15:00:05 -08:00
Bartosz Sosnowski dad732b7e6
runner: show message box when restarting with different elevation fails (#1061)
Also make the message box appear on top of the settings window.
2020-01-09 18:17:42 +01:00
yuyoyuppe a321eb8737 MSIX: minor cleanup, add certificate generation script 2019-12-24 17:06:10 +03:00
yuyoyuppe 860087d291 MSIX: implement initial msix installer 2019-12-24 17:06:10 +03:00
yuyoyuppe 48b89609e2 fancyzones: restrict dpi unaware windows horizontally to the current display to avoid unwanted resize 2019-12-17 15:37:10 +03:00
yuyoyuppe 0fd0a8b7cc format dpi_aware 2019-12-17 15:37:10 +03:00
yuyoyuppe 2e922019d7 DPIAware: implement GetAwarenessLevel and cleanup 2019-12-17 15:37:10 +03:00
yuyoyuppe 303d1fef6b
PCH: remove headers which are actually could be changed (#950) 2019-12-17 11:21:46 +03:00
Bartosz Sosnowski 619ed234a9
Do not run elevated by default (#884)
Make the runner not run as elevated by default. Add a setting for
"run PowerToys as elevated" and buttons to restart the process
with the different elevation levels.
2019-12-16 18:36:52 +01:00
Enrico Giordani fd8fc679be Run the Settings process un-elevated when possible
and if not possible run it elevated and let the Settings
process deal with it.
Add wrappers for GetModuleFileNameW.
2019-12-16 18:03:37 +01:00
Seraphima 6e3587dd43 Settings unit tests (#921) 2019-12-12 18:24:00 +01:00
yuyoyuppe f385e46927
Devdocs reorganisation (#913)
* docs: split usage and dev docs

* # This is a combination of 2 commits.
# This is the 1st commit message:

docs: split usage and dev docs

# The commit message #2 will be skipped:

# fixup add docs

* docs: add runner documentation and move hooks documentation to devdocs

* docs: add stubs for modules technical description

* docs: add paragraph about event thread-safety

* docs: add 'Current modules' section header
2019-12-12 12:25:19 +03:00
ryanbodrug-microsoft 7fc168532c
Merge pull request #902 from ryanbodrug-microsoft/user/ryanbod/getexampleprojecttobuild
Getting the example project to compile, and build.
2019-12-10 15:31:31 -08:00
yuyoyuppe 1760af50c8
Format unittests (#906) 2019-12-10 10:28:24 +03:00
ryanbodrug-microsoft 73e33d7ba9 Getting the example project to compile, and build.
1) Adding example project to Debug / Release Builds.
2) Including <string> in common.h
3) Using std::optional instead of PowerToysValues::is_[type]_value
4) Fixing warnings generated by unreferenced 'ex' variable in exception handling.
5) Updated relative path of version.h in exeample_powertoy.rc
2019-12-09 15:04:02 -08:00
yuyoyuppe 7357e40d3f
Use WinRT JSON parser instead of custom cpprestsdk solution (#822) 2019-12-06 11:40:23 +03:00
Enrico Giordani e714cb9e8b
Now working on 0.14.2 (#871) 2019-12-05 19:09:32 +01:00
Bartosz Sosnowski fed81c8e22
Improve FancyZones window filtering (#856)
Improve FancyZones window filtering and filter out dialog windows
2019-12-04 17:53:54 +01:00
Bartosz Sosnowski 0e2d93c630 Make FancyZones not zone invisible, child and tool windows
Fixes "Move newly created windows to their last known zone"
2019-12-03 19:45:03 +01:00
Enrico Giordani 3095ade94c
Now working on 0.14.1 (#797) 2019-11-28 11:06:23 +01:00
Bartosz Sosnowski ae4413d0aa
Improve key code to key name mapping. (#784)
Use the key detected by WebUI and our mapping only for from_settings call.
Replace the old Win + ~ with the correct value
2019-11-26 16:14:34 +01:00
Enrico Giordani 51b791f9c0
Version 0.14.0 (#782) 2019-11-26 11:46:22 +01:00
Bartosz Sosnowski d6f0f9ec0e FancyZones settings: show proper hotkey even when wrong key was saved before
This makes the Hotkey settings object ignore the key value stored in
json. Instead it will be deduced from the current keyboard layout and
the vk_code.
2019-11-25 11:54:10 +01:00
Bartosz Sosnowski 254474d12d Make the hotkey control display correct key
Credit to @doterik for the idea in https://github.com/microsoft/PowerToys/issues/700#issuecomment-554329895

RApplies to https://github.com/microsoft/PowerToys/issues/700
2019-11-20 10:00:53 +01:00
Bartosz Sosnowski 03438f9192
FancyZones: improve windows and apps filtering (#673)
Unifies the way windows are considered "interesting" by FancyZone.
Berfore the change WinKey + arrows would use different method than
dragging. This PR makes both use the WinKey + arrows method.

Cleans up FancyZones Settings.cpp by removing m_configStrings variable.
Contrary to its name it was used to create color picker control.

Adds a multiline option to the text input to settings. Uses this to
provide the user with a way to exclude certain apps from snapping to
zones.
2019-11-18 10:29:56 +01:00
yuyoyuppe 4e771ecfb7
initialize all OnThreadExecutor fields and clarify intent further (#701) 2019-11-12 18:29:54 +03:00
yuyoyuppe f3e25ae3e6
Fix for different per-monitor scaling (#657)
* Use DPIAware::DEFAULT_DPI

* Make runner DPI-unaware, since it doesn't need to use a Per Monitor V2 DPI.

* Programmatically enable "Per Monitor V2 DPI" for the runner proccess and use a separate DPI-unaware thread for the corresponding API calls

* Increase PCH memory limit for settings project

* Address review issues

* Draw zoneWindows properly scaled
2019-11-07 21:56:32 +03:00
Bartosz Sosnowski 6f241ef001
Now working on 0.13.0 (#617) 2019-10-31 17:51:20 +01:00
Enrico Giordani 3e9a0ea925
version 0.12.0 (#573) 2019-10-28 22:24:25 +01:00
Enrico Giordani a07a42624b
Telemetry events
* Don't trace event on exit
change 'PowertoyModuleDeleter' to not call 'module->disable();' before 'module->destroy();' so the module can distinguish between being turned off and PowerToys exiting.
Code formatting.

* uppercase for event name

* Trace on/off event for ShortcutGuide module

* Trace the 'hide' event only if the guide was visible
'on_hide()' is invoked when the module is turned off, in that case don't trace the hide event.

* Remove spaces in data field names
Remove 'ShowGuide' event since it's not providing any useful data.

* Include build number in version number
2019-10-22 08:11:23 +02:00
Bartosz Sosnowski 52b15f29ad
Add darkmode support for the settings window (#494) 2019-10-16 10:21:44 +02:00
Enrico Giordani f9be71eca5
Add version number to telemetry event
use defines from version.h in .rc files and other places.
2019-10-14 19:22:14 +02:00
Bartosz Sosnowski 5f8c4ea143
Improve window filter to include start menu and Cortana search box. (#474)
Also moves GetProcessPath* functions to common, renaming both to
get_process_path.
2019-10-07 11:12:44 +02:00
Enrico Giordani 298a8787d5 drop privileges if running elevated
make sure the Settings process is not running elevated otherwise the WebView control will fail to start
2019-10-04 11:50:27 +02:00
Bartosz Sosnowski d96db2a408 Add dropdown settings UI element 2019-10-04 09:26:40 +02:00
Bartosz Sosnowski bf82e04ddb Add radio button group and add theme select for ShortcutGuide 2019-10-03 10:12:36 +02:00
Bartosz Sosnowski 64f606daaa
Add a hotkey settings control and use it in FancyZones (#450)
Add a hotkey settings control and use it in FancyZones
2019-10-02 17:18:55 +02:00
cedi faf1fae873 Modifying the startup behaviour of the FancyZones Layout Editor
Add setting to allow to choose if the FZ editor opens in the screen where mouse cursor is or where the active windows is.
2019-09-28 16:29:29 +02:00
Bartosz Sosnowski 487c485911 Move window filter to separate function, filter more windows. 2019-09-18 10:41:16 +02:00
Bartosz Sosnowski 8ac6db8b5a
Fix cppcheck reported issues (#333)
Fixes: https://github.com/microsoft/PowerToys/issues/266
2019-09-11 12:38:20 +02:00
Bartosz Sosnowski 8431b80e48 FancyZones and Shortcut Guide initial commit
Co-authored-by: Alexis Campailla <alexis@janeasystems.com>
Co-authored-by: Bret Anderson <bretan@microsoft.com>
Co-authored-by: Enrico Giordani <enrico.giordani@gmail.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Jeff Bogdan <jeffbog@microsoft.com>
Co-authored-by: March Rogers <marchr@microsoft.com>
Co-authored-by: Mike Harsh <mharsh@microsoft.com>
Co-authored-by: Nachum Bundak <Nachum.Bundak@microsoft.com>
Co-authored-by: Oliver Jones <ojones@microsoft.com>
Co-authored-by: Patrick Little <plittle@microsoft.com>
2019-09-05 18:12:40 +02:00