mirror of
https://github.com/hyprwm/hyprlock.git
synced 2026-05-05 12:27:59 +02:00
widgets: fix layout rendering
This commit is contained in:
parent
bcc836ee09
commit
2597a94c07
1 changed files with 4 additions and 3 deletions
|
|
@ -101,9 +101,10 @@ static void replaceAllAttempts(std::string& str) {
|
|||
|
||||
static void replaceAllLayout(std::string& str) {
|
||||
|
||||
const auto LAYOUTIDX = g_pHyprlock->m_uiActiveLayout;
|
||||
const auto LAYOUTNAME = g_pSeatManager->getActiveKbLayoutName();
|
||||
size_t pos = 0;
|
||||
const auto LAYOUTIDX = g_pHyprlock->m_uiActiveLayout;
|
||||
const auto STR = xkb_keymap_layout_get_name(g_pSeatManager->m_pXKBKeymap, LAYOUTIDX);
|
||||
const std::string LAYOUTNAME = STR ? STR : "error";
|
||||
size_t pos = 0;
|
||||
|
||||
while ((pos = str.find("$LAYOUT", pos)) != std::string::npos) {
|
||||
if (str.substr(pos, 8).ends_with('[') && str.substr(pos).contains(']')) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue