diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2018-12-16 19:02:34 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2018-12-16 19:02:34 +0100 |
| commit | a46695b7fc0c318c20779456c8e994f75899003a (patch) | |
| tree | a88be393846be462ba7d5fd39f93978adc45b240 /src | |
| parent | 75293c17256ee2a6d0091ea6f33e33d3e94d7e5f (diff) | |
| parent | 59cd39a50531c255cb1855fb9133529872ee115c (diff) | |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src')
| -rw-r--r-- | src/drivers/X11/Fl_X11_Screen_Driver.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/drivers/X11/Fl_X11_Screen_Driver.cxx b/src/drivers/X11/Fl_X11_Screen_Driver.cxx index d305e81ee..34310a8dc 100644 --- a/src/drivers/X11/Fl_X11_Screen_Driver.cxx +++ b/src/drivers/X11/Fl_X11_Screen_Driver.cxx @@ -968,10 +968,8 @@ Fl_RGB_Image *Fl_X11_Screen_Driver::read_win_rectangle(int X, int Y, int w, int line_ptr[2] = cvals[i][2]; if (index_shift > 0) { - index_mask >>= 2; index_shift -= 2; } else { - index_mask = 192; index_shift = 6; pixel ++; } @@ -1239,9 +1237,9 @@ static bool use_monitors_xml(float &factor) { FILE *in = fopen(path, "r"); if (!in) return false; p = fgets(line, sizeof(line), in); - if (strstr(line, "<monitors version=\"2\">")) { + if (p && strstr(line, "<monitors version=\"2\">")) { while (fgets(line, sizeof(line), in)) { - if( (p = strstr(line, "<scale>")) && strstr(p, "</scale>") ) { + if ( (p = strstr(line, "<scale>")) && strstr(p, "</scale>") ) { p += 7; sscanf(p, "%f", &factor); if (factor == 2) { found = true; break; } |
