Merge branch 'fix' into 'master'
layout: Improve scoping of locked variable See merge request Librem5/squeekboard!329
This commit is contained in:
		@ -910,7 +910,6 @@ mod seat {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        // update
 | 
					        // update
 | 
				
			||||||
        let key = key.into_released();
 | 
					        let key = key.into_released();
 | 
				
			||||||
        let mut locked = key.action.is_locked(&layout.current_view);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // process changes
 | 
					        // process changes
 | 
				
			||||||
        match action {
 | 
					        match action {
 | 
				
			||||||
@ -924,12 +923,12 @@ mod seat {
 | 
				
			|||||||
                try_set_view(layout, view)
 | 
					                try_set_view(layout, view)
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            Action::LockView { lock, unlock } => {
 | 
					            Action::LockView { lock, unlock } => {
 | 
				
			||||||
                locked ^= true;
 | 
					                let gets_locked = !key.action.is_locked(&layout.current_view);
 | 
				
			||||||
                unstick_locks(layout)
 | 
					                unstick_locks(layout)
 | 
				
			||||||
                    // It doesn't matter what the resulting view should be,
 | 
					                    // It doesn't matter what the resulting view should be,
 | 
				
			||||||
                    // it's getting changed anyway.
 | 
					                    // it's getting changed anyway.
 | 
				
			||||||
                    .choose_view(
 | 
					                    .choose_view(
 | 
				
			||||||
                        match locked {
 | 
					                        match gets_locked {
 | 
				
			||||||
                            true => lock.clone(),
 | 
					                            true => lock.clone(),
 | 
				
			||||||
                            false => unlock.clone(),
 | 
					                            false => unlock.clone(),
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user