each object has co-ordinants. think x,y grid, x goes up, y goes right, the bottom-left corner of your screen as (0,0) and top right as (somenumber,somenumber)the x-server knows if it receives a mouse-down(click) at co-ordinants (210,320)or whatever, that that click fell within the boundrys of whatever widgit the mouse was over.
|