Skip to content

Commit

Permalink
Fix error in FindScreenOfXY
Browse files Browse the repository at this point in the history
In the previous commit, I defined the m_min variable both inside
and outside of an if block (forgot to delete the inside one). So
delete the extra definition. Also set m_min to the old return of
RB_MIN just in case (this also suppresses warnings from my complier).
  • Loading branch information
somiaj committed Oct 17, 2024
1 parent b2fe1e0 commit fa90346
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libs/FScreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,13 +824,12 @@ FindScreenOfXY(int x, int y)
return (m);
}

struct monitor *m_min;
struct monitor *m_min = NULL;
if (m == NULL) {
/* No monitor found, point is in a dead area.
* Find closest monitor using the taxi cab metric.
*/
int dmin = INT_MAX;
struct monitor *m_min;

RB_FOREACH(m, monitors, &monitor_q) {
int d = 0;
Expand Down

0 comments on commit fa90346

Please sign in to comment.