ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.517 by root, Wed Jun 6 08:59:13 2012 UTC vs.
Revision 1.524 by root, Tue Aug 14 20:32:48 2012 UTC

1467 while (XCheckTypedWindowEvent (dpy, ev.xconfigure.window, ConfigureNotify, &ev)) 1467 while (XCheckTypedWindowEvent (dpy, ev.xconfigure.window, ConfigureNotify, &ev))
1468 ; 1468 ;
1469 1469
1470 bool want_position_change = SHOULD_INVOKE (HOOK_POSITION_CHANGE); 1470 bool want_position_change = SHOULD_INVOKE (HOOK_POSITION_CHANGE);
1471 1471
1472 bool moved = false;
1472#ifdef HAVE_BG_PIXMAP 1473#ifdef HAVE_BG_PIXMAP
1473 if (bg_window_position_sensitive ()) 1474 if (bg_window_position_sensitive ())
1475 {
1474 want_position_change = true; 1476 want_position_change = true;
1477 if (!(bg_flags & BG_IS_VALID))
1478 moved = true;
1479 }
1475#endif 1480#endif
1476
1477 bool moved = false;
1478 1481
1479 if (want_position_change) 1482 if (want_position_change)
1480 { 1483 {
1481 int x, y; 1484 int x, y;
1482 1485
1488 else 1491 else
1489 get_window_origin (x, y); 1492 get_window_origin (x, y);
1490 1493
1491 if (x != parent_x || y != parent_y) 1494 if (x != parent_x || y != parent_y)
1492 { 1495 {
1493 HOOK_INVOKE ((this, HOOK_POSITION_CHANGE, DT_INT, x, DT_INT, y, DT_END));
1494 parent_x = x; 1496 parent_x = x;
1495 parent_y = y; 1497 parent_y = y;
1498 HOOK_INVOKE ((this, HOOK_POSITION_CHANGE, DT_INT, x, DT_INT, y, DT_END));
1499 moved = true;
1496 } 1500 }
1497
1498 if (bg_set_position (x, y)
1499 || !(bg_flags & BG_IS_VALID))
1500 moved = true;
1501 } 1501 }
1502 1502
1503 if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height) 1503 if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height)
1504 { 1504 {
1505 seen_resize = 1; 1505 seen_resize = 1;
2387 } 2387 }
2388 2388
2389 if (len == (size_t)-1) 2389 if (len == (size_t)-1)
2390 { 2390 {
2391 mbstate.reset (); // reset now undefined conversion state 2391 mbstate.reset (); // reset now undefined conversion state
2392 // a -1 might indicate that a previous incomplet char is invalid (previous return -2)
2393 // in which case we "errornously" return the next byte which might be valid.
2392 return (unsigned char)*cmdbuf_ptr++; // the _occasional_ latin1 character is allowed to slip through 2394 return (unsigned char)*cmdbuf_ptr++; // the _occasional_ latin1 character is allowed to slip through
2393 } 2395 }
2394 2396
2395 // assume wchar == unicode 2397 // assume wchar == unicode
2396 cmdbuf_ptr += len; 2398 cmdbuf_ptr += len;
3472#if BG_IMAGE_FROM_FILE 3474#if BG_IMAGE_FROM_FILE
3473 case Rxvt_Pixmap: 3475 case Rxvt_Pixmap:
3474 if (!strcmp (str, "?")) 3476 if (!strcmp (str, "?"))
3475 { 3477 {
3476 char str[256]; 3478 char str[256];
3477 int h_scale = 0, v_scale = 0;
3478 int h_align = 0, v_align = 0;
3479 if (image_vec.size () > 0)
3480 {
3481 h_scale = image_vec[0].h_scale; 3479 int h_scale = fimage.h_scale;
3482 v_scale = image_vec[0].v_scale; 3480 int v_scale = fimage.v_scale;
3483 h_align = image_vec[0].h_align; 3481 int h_align = fimage.h_align;
3484 v_align = image_vec[0].v_align; 3482 int v_align = fimage.v_align;
3485 }
3486 3483
3487 sprintf (str, "[%dx%d+%d+%d]", 3484 sprintf (str, "[%dx%d+%d+%d]",
3488 h_scale, v_scale, 3485 h_scale, v_scale,
3489 h_align, v_align); 3486 h_align, v_align);
3490 process_xterm_seq (XTerm_title, str, CHAR_ST); 3487 process_xterm_seq (XTerm_title, str, CHAR_ST);
3493 { 3490 {
3494 bool changed = false; 3491 bool changed = false;
3495 3492
3496 if (*str != ';') 3493 if (*str != ';')
3497 { 3494 {
3498 if (image_vec.size () > 0)
3499 changed = image_vec[0].set_file_geometry (str);
3500 else 3495 try
3501 { 3496 {
3502 rxvt_image *image = new_image ();
3503 if (!image->set_file_geometry (str)) 3497 fimage.set_file_geometry (this, str);
3504 image_vec.pop_back ();
3505 else
3506 changed = true; 3498 changed = true;
3499 }
3500 catch (const class rxvt_failure_exception &e)
3501 {
3507 } 3502 }
3508 } 3503 }
3509 else 3504 else
3510 { 3505 {
3511 str++; 3506 str++;
3512 if (image_vec.size () > 0)
3513 changed = image_vec[0].set_geometry (str, true); 3507 if (fimage.set_geometry (str, true))
3508 changed = true;
3514 } 3509 }
3515 3510
3516 if (changed) 3511 if (changed)
3517 { 3512 {
3518 if (bg_window_position_sensitive ()) 3513 if (bg_window_position_sensitive ())
3519 { 3514 {
3520 int x, y; 3515 int x, y;
3521 get_window_origin (x, y); 3516 get_window_origin (x, y);
3522 bg_set_position (x, y); 3517 parent_x = x;
3518 parent_y = y;
3523 } 3519 }
3524 update_background (); 3520 update_background ();
3525 } 3521 }
3526 } 3522 }
3527 break; 3523 break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines