mirror of
https://github.com/microsoft/terminal.git
synced 2026-05-06 20:34:29 +00:00
Eliminate the DispatchCommon class (#12389)
## Summary of the Pull Request Other than the `s_ResizeWindow` function, the `DispatchCommon` class was just a couple of static functions indirectly calling the `ConGetSet` interface. So by moving the `s_ResizeWindow` implementation into the `ConhostInternalGetSet` class, we could easily replace all usage of `DispatchCommon` with direct calls to `ConGetSet`. ## PR Checklist * [x] Closes #12253 * [x] CLA signed. * [ ] Tests added/passed * [ ] Documentation updated. * [ ] Schema updated. * [x] I've discussed this with core contributors already. Issue number where discussion took place: #12253 ## Validation Steps Performed I've manually confirmed the resizing operations still work as expected. The other functions are harder to test, but were trivial replacements.
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
#include "output.h"
|
||||
#include "handle.h"
|
||||
#include "../interactivity/inc/ServiceLocator.hpp"
|
||||
#include "../terminal/adapter/DispatchCommon.hpp"
|
||||
|
||||
using namespace Microsoft::Console;
|
||||
using namespace Microsoft::Console::Interactivity;
|
||||
@@ -137,9 +136,9 @@ void PtySignalInputThread::ConnectConsole() noexcept
|
||||
// - <none>
|
||||
void PtySignalInputThread::_DoResizeWindow(const ResizeWindowData& data)
|
||||
{
|
||||
if (DispatchCommon::s_ResizeWindow(*_pConApi, data.sx, data.sy))
|
||||
if (_pConApi->ResizeWindow(data.sx, data.sy))
|
||||
{
|
||||
DispatchCommon::s_SuppressResizeRepaint(*_pConApi);
|
||||
_pConApi->SuppressResizeRepaint();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user