* [PATCH for-8.0] Revert "ui: set cursor position upon listener registration"
@ 2023-03-18 17:31 Bernhard Beschow
2023-03-19 11:11 ` Marc-André Lureau
0 siblings, 1 reply; 3+ messages in thread
From: Bernhard Beschow @ 2023-03-18 17:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, Marc-André Lureau, Bernhard Beschow
Commit 6effaa16ac98 ("ui: set cursor position upon listener registration")
causes the mouse cursor to be placed into the lower left corner when QEMU
starts. This could be reproduced with just by running
`qemu-system-x86_64`.
This reverts commit 6effaa16ac9846e7d6197ee54a0551fba61aecd7.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
ui/console.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/ui/console.c b/ui/console.c
index f3783021e5..35f8274aab 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -95,7 +95,6 @@ struct QemuConsole {
QemuUIInfo ui_info;
QEMUTimer *ui_timer;
QEMUCursor *cursor;
- int cursor_x, cursor_y, cursor_on;
const GraphicHwOps *hw_ops;
void *hw;
@@ -1666,9 +1665,6 @@ void register_displaychangelistener(DisplayChangeListener *dcl)
if (con && con->cursor && dcl->ops->dpy_cursor_define) {
dcl->ops->dpy_cursor_define(dcl, con->cursor);
}
- if (con && dcl->ops->dpy_mouse_set) {
- dcl->ops->dpy_mouse_set(dcl, con->cursor_x, con->cursor_y, con->cursor_on);
- }
text_console_update_cursor(NULL);
}
@@ -1913,9 +1909,6 @@ void dpy_mouse_set(QemuConsole *con, int x, int y, int on)
DisplayState *s = con->ds;
DisplayChangeListener *dcl;
- con->cursor_x = x;
- con->cursor_y = y;
- con->cursor_on = on;
if (!qemu_console_is_visible(con)) {
return;
}
--
2.40.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH for-8.0] Revert "ui: set cursor position upon listener registration"
2023-03-18 17:31 [PATCH for-8.0] Revert "ui: set cursor position upon listener registration" Bernhard Beschow
@ 2023-03-19 11:11 ` Marc-André Lureau
2023-03-19 12:24 ` Bernhard Beschow
0 siblings, 1 reply; 3+ messages in thread
From: Marc-André Lureau @ 2023-03-19 11:11 UTC (permalink / raw)
To: Bernhard Beschow; +Cc: qemu-devel, Gerd Hoffmann
Hi
On Sat, Mar 18, 2023 at 9:33 PM Bernhard Beschow <shentey@gmail.com> wrote:
>
> Commit 6effaa16ac98 ("ui: set cursor position upon listener registration")
> causes the mouse cursor to be placed into the lower left corner when QEMU
> starts. This could be reproduced with just by running
> `qemu-system-x86_64`.
>
> This reverts commit 6effaa16ac9846e7d6197ee54a0551fba61aecd7.
What display do you test with, gtk on x11?
thanks
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
> ui/console.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/ui/console.c b/ui/console.c
> index f3783021e5..35f8274aab 100644
> --- a/ui/console.c
> +++ b/ui/console.c
> @@ -95,7 +95,6 @@ struct QemuConsole {
> QemuUIInfo ui_info;
> QEMUTimer *ui_timer;
> QEMUCursor *cursor;
> - int cursor_x, cursor_y, cursor_on;
> const GraphicHwOps *hw_ops;
> void *hw;
>
> @@ -1666,9 +1665,6 @@ void register_displaychangelistener(DisplayChangeListener *dcl)
> if (con && con->cursor && dcl->ops->dpy_cursor_define) {
> dcl->ops->dpy_cursor_define(dcl, con->cursor);
> }
> - if (con && dcl->ops->dpy_mouse_set) {
> - dcl->ops->dpy_mouse_set(dcl, con->cursor_x, con->cursor_y, con->cursor_on);
> - }
> text_console_update_cursor(NULL);
> }
>
> @@ -1913,9 +1909,6 @@ void dpy_mouse_set(QemuConsole *con, int x, int y, int on)
> DisplayState *s = con->ds;
> DisplayChangeListener *dcl;
>
> - con->cursor_x = x;
> - con->cursor_y = y;
> - con->cursor_on = on;
> if (!qemu_console_is_visible(con)) {
> return;
> }
> --
> 2.40.0
>
>
--
Marc-André Lureau
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH for-8.0] Revert "ui: set cursor position upon listener registration"
2023-03-19 11:11 ` Marc-André Lureau
@ 2023-03-19 12:24 ` Bernhard Beschow
0 siblings, 0 replies; 3+ messages in thread
From: Bernhard Beschow @ 2023-03-19 12:24 UTC (permalink / raw)
To: Marc-André Lureau; +Cc: qemu-devel, Gerd Hoffmann
Am 19. März 2023 11:11:39 UTC schrieb "Marc-André Lureau" <marcandre.lureau@gmail.com>:
>Hi
>
>On Sat, Mar 18, 2023 at 9:33 PM Bernhard Beschow <shentey@gmail.com> wrote:
>>
>> Commit 6effaa16ac98 ("ui: set cursor position upon listener registration")
>> causes the mouse cursor to be placed into the lower left corner when QEMU
>> starts. This could be reproduced with just by running
>> `qemu-system-x86_64`.
>>
>> This reverts commit 6effaa16ac9846e7d6197ee54a0551fba61aecd7.
>
>What display do you test with, gtk on x11?
>thanks
Yes, gtk on x11.
BTW, the cursor is placed in the bottom left corner of the *screen*.
Best regards,
Bernhard
>
>>
>> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
>> ---
>> ui/console.c | 7 -------
>> 1 file changed, 7 deletions(-)
>>
>> diff --git a/ui/console.c b/ui/console.c
>> index f3783021e5..35f8274aab 100644
>> --- a/ui/console.c
>> +++ b/ui/console.c
>> @@ -95,7 +95,6 @@ struct QemuConsole {
>> QemuUIInfo ui_info;
>> QEMUTimer *ui_timer;
>> QEMUCursor *cursor;
>> - int cursor_x, cursor_y, cursor_on;
>> const GraphicHwOps *hw_ops;
>> void *hw;
>>
>> @@ -1666,9 +1665,6 @@ void register_displaychangelistener(DisplayChangeListener *dcl)
>> if (con && con->cursor && dcl->ops->dpy_cursor_define) {
>> dcl->ops->dpy_cursor_define(dcl, con->cursor);
>> }
>> - if (con && dcl->ops->dpy_mouse_set) {
>> - dcl->ops->dpy_mouse_set(dcl, con->cursor_x, con->cursor_y, con->cursor_on);
>> - }
>> text_console_update_cursor(NULL);
>> }
>>
>> @@ -1913,9 +1909,6 @@ void dpy_mouse_set(QemuConsole *con, int x, int y, int on)
>> DisplayState *s = con->ds;
>> DisplayChangeListener *dcl;
>>
>> - con->cursor_x = x;
>> - con->cursor_y = y;
>> - con->cursor_on = on;
>> if (!qemu_console_is_visible(con)) {
>> return;
>> }
>> --
>> 2.40.0
>>
>>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-19 12:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-18 17:31 [PATCH for-8.0] Revert "ui: set cursor position upon listener registration" Bernhard Beschow
2023-03-19 11:11 ` Marc-André Lureau
2023-03-19 12:24 ` Bernhard Beschow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).