Skip to content

[dx] Disable automatic Alt+Enter handling in DXGI#3479

Merged
bors[bot] merged 1 commit intogfx-rs:masterfrom
Herschel:dx-disable-alt-enter
Nov 17, 2020
Merged

[dx] Disable automatic Alt+Enter handling in DXGI#3479
bors[bot] merged 1 commit intogfx-rs:masterfrom
Herschel:dx-disable-alt-enter

Conversation

@Herschel
Copy link
Copy Markdown
Contributor

@Herschel Herschel commented Nov 17, 2020

Fixes #3477.

Uses IDXGIFactory::MakeWindowAssociation to disable Alt+Enter behavior on dx11/dx12 backends.

  • winapi-rs does not have the DXGI_MWA constants (opened PR Add DXGI MakeWindowAssociation constants retep998/winapi-rs#960). Not sure where to cram these -- for now, I put them right beside the function call.
  • Using both DXGI_MWA_NO_WINDOW_CHANGES | DXGI_MWA_NO_ALT_ENTER. Either of these seems to disable the Alt+Enter behavior; according to the docs, DXGI_MWA_NO_WINDOW_CHANGES seems more general, but I guess this is desired (DXGI shouldn't fiddle with anything automatically for consistent behavior among backends?).

PR checklist:

  • make succeeds (on *nix)
  • make reftests succeeds
  • tested examples with the following backends:
    • dx11, dx12, vulkan

Copy link
Copy Markdown
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!
bors r+

@bors
Copy link
Copy Markdown
Contributor

bors Bot commented Nov 17, 2020

@bors bors Bot merged commit c80fd98 into gfx-rs:master Nov 17, 2020
@Herschel Herschel deleted the dx-disable-alt-enter branch November 17, 2020 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DX11/12 backends automagically install an Alt+Enter fullscreen handler

2 participants