Skip to content
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

Fix TO() and DF() calling layer_state_set_[kb,user] twice #6003

Merged

Conversation

fauxpark
Copy link
Member

Description

When using TO() and DF(), layer_state_set_user() was observed to be called twice. This was not a keydown/keyup thing - the code first does an AND, then an OR, which both call layer_state_set(), which in turn calls layer_state_set_kb()... Instead of doing that, we can directly set the layer state here.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Copy link
Contributor

@mechmerlin mechmerlin left a comment

Choose a reason for hiding this comment

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

Thanks!

@mechmerlin mechmerlin merged commit d16056e into qmk:master May 29, 2019
@fauxpark fauxpark deleted the fix-to-df-duplicate-layer-state-calls branch May 29, 2019 14:46
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request May 29, 2019
fdidron pushed a commit to zsa/qmk_firmware that referenced this pull request Jun 4, 2019
tenderlove added a commit to tenderlove/qmk_firmware that referenced this pull request Jun 10, 2019
* master: (790 commits)
  [Keyboard] YMD96 refactor (qmk#5472)
  Update reference_configurator_support.md
  Use qmk docker image for travis CI builds
  [Keyboard] Remove file with same name and different case (qmk#6028)
  [Keyboard] Fix json for NK65 (qmk#6026)
  [Keymap] added hhkb layout for tada68 (qmk#6027)
  [Keymap] Added keymap for user jasondunsmore (qmk#6023)
  [Keyboard] Fix jc65 when RGB or BACKLIGHT disabled (qmk#6022)
  Update feature_encoders.md
  Copy avr teensy flash logic to arm (qmk#6016)
  [Keyboard] E6V2 R2 BMC PCB (qmk#6009)
  Add belgian layout for sendstring (qmk#6008)
  [Keyboard] Added XW60 PCB (qmk#6011)
  [Keymap] Georgi flippydippy layout (qmk#6005)
  Fix TO() and DF() calling layer_state_set_[kb,user] twice (qmk#6003)
  Update 333fred keymaps and add new iris map. (qmk#6010)
  [Keyboard] Changed LED positions for Massdrop CTRL and DZ60RGB (qmk#5801)
  [Keyboard] Add support for AKB boards (qmk#5996)
  Duck Octagon V1 Configurator cleanup (qmk#5957)
  Fixing matrix_scan so it properly returns changed status
  ...
Timbus pushed a commit to Timbus/qmk_firmware that referenced this pull request Jun 23, 2019
ridingqwerty pushed a commit to ridingqwerty/qmk_firmware that referenced this pull request Jan 10, 2020
JeffreyPalmer pushed a commit to JeffreyPalmer/qmk_firmware that referenced this pull request Feb 27, 2020
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants