@@ -636,7 +636,10 @@ gui_gtk3_update_cursor(cairo_t *cr)
636636 if (gui .row == gui .cursor_row )
637637 {
638638 gui .by_signal = TRUE;
639- gui_update_cursor (TRUE, TRUE);
639+ if (State & CMDLINE )
640+ gui_update_cursor (TRUE, FALSE);
641+ else
642+ gui_update_cursor (TRUE, TRUE);
640643 gui .by_signal = FALSE;
641644 cairo_paint (cr );
642645 }
@@ -6310,8 +6313,25 @@ gui_mch_flash(int msec)
63106313gui_mch_invert_rectangle (int r , int c , int nr , int nc )
63116314{
63126315#if GTK_CHECK_VERSION (3 ,0 ,0 )
6313- /* TODO Replace GdkGC with Cairo */
6314- (void )r ; (void )c ; (void )nr ; (void )nc ;
6316+ const GdkRectangle rect = {
6317+ FILL_X (c ), FILL_Y (r ), nc * gui .char_width , nr * gui .char_height
6318+ };
6319+ cairo_t * const cr = cairo_create (gui .surface );
6320+
6321+ set_cairo_source_rgb_from_pixel (cr , gui .norm_pixel ^ gui .back_pixel );
6322+ # if CAIRO_VERSION >= CAIRO_VERSION_ENCODE (1 ,9 ,2 )
6323+ cairo_set_operator (cr , CAIRO_OPERATOR_DIFFERENCE );
6324+ # else
6325+ /* Give an implementation for older cairo versions if necessary. */
6326+ # endif
6327+ gdk_cairo_rectangle (cr , & rect );
6328+ cairo_fill (cr );
6329+
6330+ cairo_destroy (cr );
6331+
6332+ if (!gui .by_signal )
6333+ gtk_widget_queue_draw_area (gui .drawarea , rect .x , rect .y ,
6334+ rect .width , rect .height );
63156335#else
63166336 GdkGCValues values ;
63176337 GdkGC * invert_gc ;
0 commit comments