Skip to content

Commit

Permalink
Viewer: Don't steal focus when the shader error window appears
Browse files Browse the repository at this point in the history
Makes editing shaders (in the SkSL or Particles slides) tolerable.
Previously, every intermediate state (that didn't compile) would force
you to stop and click back in the code window.

Change-Id: Ibc12b8d697a6b5073e24020daa143a4047a5da31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301984
Reviewed-by: John Stiles <[email protected]>
Commit-Queue: Brian Osman <[email protected]>
Auto-Submit: Brian Osman <[email protected]>
  • Loading branch information
brianosman authored and Skia Commit-Bot committed Jul 13, 2020
1 parent 041796e commit 31890e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/viewer/Viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2378,7 +2378,7 @@ void Viewer::drawImGui() {

if (gShaderErrorHandler.fErrors.count()) {
ImGui::SetNextWindowSize(ImVec2(400, 400), ImGuiCond_FirstUseEver);
ImGui::Begin("Shader Errors");
ImGui::Begin("Shader Errors", nullptr, ImGuiWindowFlags_NoFocusOnAppearing);
for (int i = 0; i < gShaderErrorHandler.fErrors.count(); ++i) {
ImGui::TextWrapped("%s", gShaderErrorHandler.fErrors[i].c_str());
SkSL::String sksl(gShaderErrorHandler.fShaders[i].c_str());
Expand Down

0 comments on commit 31890e2

Please sign in to comment.