@@ -231,8 +231,8 @@ contains |
| 231 | type(c_ptr), value :: window | 231 | type(c_ptr), value :: window |
| 232 | integer(c_int), value :: width, height | 232 | integer(c_int), value :: width, height |
| 233 | | 233 | |
| 234 | - ! Unused argument (required by GLFW callback signature) | 234 | + ! Suppress unused argument warning (required by GLFW callback signature) |
| 235 | - if (.false.) print *, transfer(window, 0_c_int) | 235 | + if (.false. .and. c_associated(window)) continue |
| 236 | | 236 | |
| 237 | call glViewport(0, 0, width, height) | 237 | call glViewport(0, 0, width, height) |
| 238 | | 238 | |
@@ -248,8 +248,8 @@ contains |
| 248 | subroutine window_refresh_callback(window) bind(C) | 248 | subroutine window_refresh_callback(window) bind(C) |
| 249 | type(c_ptr), value :: window | 249 | type(c_ptr), value :: window |
| 250 | | 250 | |
| 251 | - ! Unused argument (required by GLFW callback signature) | 251 | + ! Suppress unused argument warning (required by GLFW callback signature) |
| 252 | - if (.false.) print *, transfer(window, 0_c_int) | 252 | + if (.false. .and. c_associated(window)) continue |
| 253 | | 253 | |
| 254 | ! Trigger a redraw via the render callback | 254 | ! Trigger a redraw via the render callback |
| 255 | if (associated(render_callback)) then | 255 | if (associated(render_callback)) then |
@@ -525,8 +525,8 @@ contains |
| 525 | character(len=4) :: utf8 | 525 | character(len=4) :: utf8 |
| 526 | integer :: utf8_len | 526 | integer :: utf8_len |
| 527 | | 527 | |
| 528 | - ! Unused argument (required by GLFW callback signature) | 528 | + ! Suppress unused argument warning (required by GLFW callback signature) |
| 529 | - if (.false.) print *, transfer(window, 0_c_int) | 529 | + if (.false. .and. c_associated(window)) continue |
| 530 | | 530 | |
| 531 | if (.not. associated(active_pty)) return | 531 | if (.not. associated(active_pty)) return |
| 532 | | 532 | |
@@ -658,8 +658,8 @@ contains |
| 658 | integer(c_int), value :: error_code | 658 | integer(c_int), value :: error_code |
| 659 | type(c_ptr), value :: description | 659 | type(c_ptr), value :: description |
| 660 | | 660 | |
| 661 | - ! Unused argument (required by GLFW callback signature) | 661 | + ! Suppress unused argument warning (required by GLFW callback signature) |
| 662 | - if (.false.) print *, transfer(description, 0_c_int) | 662 | + if (.false. .and. c_associated(description)) continue |
| 663 | | 663 | |
| 664 | print *, "GLFW Error ", error_code | 664 | print *, "GLFW Error ", error_code |
| 665 | end subroutine error_callback | 665 | end subroutine error_callback |
@@ -670,8 +670,9 @@ contains |
| 670 | real(c_double), value :: xoffset, yoffset | 670 | real(c_double), value :: xoffset, yoffset |
| 671 | integer :: scroll_lines | 671 | integer :: scroll_lines |
| 672 | | 672 | |
| 673 | - ! Unused arguments (required by GLFW callback signature) | 673 | + ! Suppress unused argument warnings (required by GLFW callback signature) |
| 674 | - if (.false.) print *, transfer(window, 0_c_int), xoffset | 674 | + if (.false. .and. c_associated(window)) continue |
| | 675 | + if (.false. .and. xoffset > 0.0d0) continue |
| 675 | | 676 | |
| 676 | if (.not. associated(active_term)) return | 677 | if (.not. associated(active_term)) return |
| 677 | | 678 | |
@@ -807,8 +808,8 @@ contains |
| 807 | real(c_double), value :: xpos, ypos | 808 | real(c_double), value :: xpos, ypos |
| 808 | integer :: col, row | 809 | integer :: col, row |
| 809 | | 810 | |
| 810 | - ! Unused argument (required by GLFW callback signature) | 811 | + ! Suppress unused argument warning (required by GLFW callback signature) |
| 811 | - if (.false.) print *, transfer(window, 0_c_int) | 812 | + if (.false. .and. c_associated(window)) continue |
| 812 | | 813 | |
| 813 | ! Only update if actively selecting | 814 | ! Only update if actively selecting |
| 814 | if (.not. active_selection%selecting) return | 815 | if (.not. active_selection%selecting) return |