diff --git a/content/events/src/nsEventStateManager.cpp b/content/events/src/nsEventStateManager.cpp index b7c89d0223e1..c016fb0afab4 100644 --- a/content/events/src/nsEventStateManager.cpp +++ b/content/events/src/nsEventStateManager.cpp @@ -1135,12 +1135,17 @@ nsEventStateManager::SetCursor(PRInt32 aCursor, nsIWidget* aWidget, PRBool aLock case NS_STYLE_CURSOR_E_RESIZE: c = eCursor_sizeWE; break; - //We don't have cursors defined for these in nsIWidget. Need them to fix this. - case NS_STYLE_CURSOR_NE_RESIZE: case NS_STYLE_CURSOR_NW_RESIZE: + c = eCursor_sizeNW; + break; case NS_STYLE_CURSOR_SE_RESIZE: + c = eCursor_sizeSE; + break; + case NS_STYLE_CURSOR_NE_RESIZE: + c = eCursor_sizeNE; + break; case NS_STYLE_CURSOR_SW_RESIZE: - c = eCursor_select; + c = eCursor_sizeSW; break; } diff --git a/layout/events/src/nsEventStateManager.cpp b/layout/events/src/nsEventStateManager.cpp index b7c89d0223e1..c016fb0afab4 100644 --- a/layout/events/src/nsEventStateManager.cpp +++ b/layout/events/src/nsEventStateManager.cpp @@ -1135,12 +1135,17 @@ nsEventStateManager::SetCursor(PRInt32 aCursor, nsIWidget* aWidget, PRBool aLock case NS_STYLE_CURSOR_E_RESIZE: c = eCursor_sizeWE; break; - //We don't have cursors defined for these in nsIWidget. Need them to fix this. - case NS_STYLE_CURSOR_NE_RESIZE: case NS_STYLE_CURSOR_NW_RESIZE: + c = eCursor_sizeNW; + break; case NS_STYLE_CURSOR_SE_RESIZE: + c = eCursor_sizeSE; + break; + case NS_STYLE_CURSOR_NE_RESIZE: + c = eCursor_sizeNE; + break; case NS_STYLE_CURSOR_SW_RESIZE: - c = eCursor_select; + c = eCursor_sizeSW; break; } diff --git a/widget/public/nsIWidget.h b/widget/public/nsIWidget.h index 5b8c0b128f00..05e6a14737f4 100644 --- a/widget/public/nsIWidget.h +++ b/widget/public/nsIWidget.h @@ -148,6 +148,11 @@ enum nsCursor { ///(normal cursor, usually rendered as an arrow) eCursor_sizeWE, ///(north/south sizing, usually rendered as sizeWE rotated 90 degrees) eCursor_sizeNS, + ///(corner sizing) + eCursor_sizeNW, + eCursor_sizeSE, + eCursor_sizeNE, + eCursor_sizeSW, eCursor_arrow_north, eCursor_arrow_north_plus, eCursor_arrow_south, diff --git a/widget/src/gtk/nsWidget.cpp b/widget/src/gtk/nsWidget.cpp index b83fe6e117af..2bc230115885 100644 --- a/widget/src/gtk/nsWidget.cpp +++ b/widget/src/gtk/nsWidget.cpp @@ -836,6 +836,13 @@ NS_IMETHODIMP nsWidget::SetCursor(nsCursor aCursor) case eCursor_sizeNS: newCursor = gdk_cursor_new(GDK_TCROSS); break; + + case eCursor_sizeNW: + case eCursor_sizeSE: + case eCursor_sizeNE: + case eCursor_sizeSW: + // XXX: these resize cursors need to be implemented + break; case eCursor_arrow_south: case eCursor_arrow_south_plus: diff --git a/widget/src/windows/nsWindow.cpp b/widget/src/windows/nsWindow.cpp index 514313e5f8d4..16581da49157 100644 --- a/widget/src/windows/nsWindow.cpp +++ b/widget/src/windows/nsWindow.cpp @@ -1621,6 +1621,16 @@ NS_METHOD nsWindow::SetCursor(nsCursor aCursor) newCursor = ::LoadCursor(NULL, IDC_SIZENS); break; + case eCursor_sizeNW: + case eCursor_sizeSE: + newCursor = ::LoadCursor(NULL, IDC_SIZENWSE); + break; + + case eCursor_sizeNE: + case eCursor_sizeSW: + newCursor = ::LoadCursor(NULL, IDC_SIZENESW); + break; + case eCursor_arrow_north: newCursor = ::LoadCursor(nsToolkit::mDllInstance, MAKEINTRESOURCE(IDC_ARROWNORTH)); break;