ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/urxvt-popup
(Generate patch)

Comparing rxvt-unicode/src/perl/urxvt-popup (file contents):
Revision 1.8 by root, Sun Jan 8 00:34:57 2006 UTC vs.
Revision 1.10 by root, Sun Jan 8 00:48:14 2006 UTC

27} 27}
28 28
29sub on_motion_notify { 29sub on_motion_notify {
30 my ($self, $event) = @_; 30 my ($self, $event) = @_;
31 31
32 delete $self->{hover};
33
34 my ($row, $col) = ($event->{row}, $event->{col});
35 if ($col >= 0 && $col < $self->ncol
36 && $row >= 0 && $row < @{ $self->{data}{item} }) {
32 $self->{hover} = $event->{row} + 1; 37 $self->{hover} = $event->{row} + 1;
38 }
33 $self->refresh; 39 $self->refresh;
34 40
35 1 41 1
36} 42}
37 43
45} 51}
46 52
47sub on_button_release { 53sub on_button_release {
48 my ($self, $event) = @_; 54 my ($self, $event) = @_;
49 55
50 my $row = $event->{row};
51 my $col = $event->{col};
52
53 if ($event->{button} == $self->{data}{event}{button}) { 56 if ($event->{button} == $self->{data}{event}{button}) {
54 $self->ungrab; 57 $self->ungrab;
55 $self->destroy; 58 $self->destroy;
56 } 59 }
57 60
58 $self->{press}[$event->{button}] = 0; 61 $self->{press}[$event->{button}] = 0;
59 62
63 my ($row, $col) = ($event->{row}, $event->{col});
60 if ($col >= 0 && $col < $self->ncol 64 if ($col >= 0 && $col < $self->ncol
61 && $row >= 0 && $row < @{ $self->{data}{item} }) { 65 && $row >= 0 && $row < @{ $self->{data}{item} }) {
62 $self->{data}{item}[$row]{activate}->($event); 66 $self->{data}{item}[$row]{activate}->($event);
63 } 67 }
64 68
105} 109}
106 110
107sub on_start { 111sub on_start {
108 my ($self) = @_; 112 my ($self) = @_;
109 113
114 $self->cmd_parse ("\x1b[?25l\x1b[?7l");
115 $self->refresh;
116
110 # might fail, but try anyways 117 # might fail, but try anyways
111 $self->grab ($self->{data}{event}{time}, 1) 118 $self->grab ($self->{data}{event}{time}, 1)
112 and $self->allow_events_async; 119 and $self->allow_events_async;
113 120
114 on_button_press $self, $self->{data}{event} if $self->{data}{event}{button}; 121 on_button_press $self, $self->{data}{event} if $self->{data}{event}{button};
115
116 $self->cmd_parse ("\x1b[?25l\x1b[?7l");
117 refresh $self;
118 122
119 () 123 ()
120} 124}
121 125
122sub on_map_notify { 126sub on_map_notify {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines