Use API to find if content is selectable, instead of guessing.

This commit is contained in:
Michael Drake 2014-11-22 00:01:12 +00:00
parent ba9a049d7b
commit 0756b544c6

View File

@ -889,7 +889,7 @@ static void ami_menu_item_edit_copy(struct Hook *hook, APTR window, struct Intui
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
if(content_get_type(gwin->gw->bw->current_content) <= CONTENT_CSS) {
if(browser_window_can_select(gwin->gw->bw) {
browser_window_key_press(gwin->gw->bw, KEY_COPY_SELECTION);
browser_window_key_press(gwin->gw->bw, KEY_CLEAR_SELECTION);
}