Fix two bugs related to command execution:
- When executing a command, control flow would fall through to the display cycle code, changing the display. - When display cycling was prevented by the user (via -l), command execution was also disabled.
This commit is contained in:
		
							parent
							
								
									2ca71dc449
								
							
						
					
					
						commit
						145662ff35
					
				
					 1 changed files with 21 additions and 18 deletions
				
			
		| 
						 | 
					@ -522,7 +522,7 @@ void wmmon_routine(int argc, char **argv)
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
			case ButtonRelease:
 | 
								case ButtonRelease:
 | 
				
			||||||
				i = CheckMouseRegion(Event.xbutton.x, Event.xbutton.y);
 | 
									i = CheckMouseRegion(Event.xbutton.x, Event.xbutton.y);
 | 
				
			||||||
				if (but_stat == i && but_stat >= 0 && mode_cycling) {
 | 
									if (but_stat == i && but_stat >= 0) {
 | 
				
			||||||
					switch (but_stat) {
 | 
										switch (but_stat) {
 | 
				
			||||||
					case 0:
 | 
										case 0:
 | 
				
			||||||
						switch (Event.xbutton.button) {
 | 
											switch (Event.xbutton.button) {
 | 
				
			||||||
| 
						 | 
					@ -539,7 +539,9 @@ void wmmon_routine(int argc, char **argv)
 | 
				
			||||||
								execCommand(right_action);
 | 
													execCommand(right_action);
 | 
				
			||||||
							break;
 | 
												break;
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
 | 
											break;
 | 
				
			||||||
					case 1:
 | 
										case 1:
 | 
				
			||||||
 | 
											if (mode_cycling) {
 | 
				
			||||||
							stat_current++;
 | 
												stat_current++;
 | 
				
			||||||
							if (stat_current == stat_online)
 | 
												if (stat_current == stat_online)
 | 
				
			||||||
								stat_current = 0;
 | 
													stat_current = 0;
 | 
				
			||||||
| 
						 | 
					@ -561,6 +563,7 @@ void wmmon_routine(int argc, char **argv)
 | 
				
			||||||
								setMaskXY(0, 0);
 | 
													setMaskXY(0, 0);
 | 
				
			||||||
							}
 | 
												}
 | 
				
			||||||
							RedrawWindowXY(xpm_X, xpm_Y);
 | 
												RedrawWindowXY(xpm_X, xpm_Y);
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
						break;
 | 
											break;
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue