'2022/06/08'에 해당되는 글 2건

  1. 2022.06.08 개발자는 맥을 쓴다? 14
  2. 2022.06.08 weston desktop-shell output destory
Apple2022. 6. 8. 14:19

그냥 머랄까.. 개발자도 워낙 분야가 많은데 무슨 개발자를 지칭하는진 모르겠지만

최소한 임베디드 리눅스 와, 임베디드(MCU) 개발자는 맥을 쓸 이유가 없을 듯 하다.

 

개인적으로는 개발자 중에 아래의 직군(?)에는 쓸만하다고 생각된다.

1. 안드로이드 + iOS 앱 개발자

 

아래 직군에게는 굳이? 라는 느낌

1. 웹 개발 (DB, WAS, frontend, backend.. 솔찍히 killer app의 차이, 디자이너 프로젝트 공유라면 조금은 수긍 가능)

2. 파이썬 + 딥러닝 (리눅스나 맥이나..)

3. 유닉스 개발 (바이너리 호환성도 없는데 가능할까?)

 

아래 직군에게는 비추

1. 리눅스 시스템 어플리케이션 개발

2. 윈도우 어플리케이션 개발

3. MCU, FPGA 개발

4. openGL, openCV 개발

5. QT 개발

 

아무튼.. 윈도우에서 맥을 개발할 것을 기대하지 않듯

맥에서 리눅스를 개발할 것을 기대하면 안된다.

bash 쉘이 돌아간다고 해서(zsh이 기본이긴 하지만) 쉘이 전부가 아니기에..

 

 

[링크 : https://heyoonow.tistory.com/53]

[링크 : https://webisfree.com/2020-08-24/개발자에게-맥북-mac-장비가-필요할까]

[링크 : https://m.blog.naver.com/hanbroz/221266822987]

 

비싼 터미널로 쓸거면 왜 굳이 맥을.. 이라는 느낌이 들게 한 글

[링크 : https://greypencil.tistory.com/127]

 

아무튼.. 

윈 <-, -> 처럼 간단하게 창을 나누어서 옮기는 것도 기본 OS 상태에서는 안되고

유틸리티 깔아서 설정해야 되는데 이걸 편하다고 해야할진 모르겠다.

우분투만 해도 기본적으로 gnome에서 제공하고 있는 기능인데 말이다.

[링크 : https://travel.plusblog.co.kr/810]

'Apple' 카테고리의 다른 글

맥 초기화, 설치 usb?  (0) 2022.06.18
USB 이더넷 인식이 맥에서 안되네?  (0) 2022.06.18
맥은 맥이다. (mac is NOT LINUX)  (0) 2022.05.29
.DS_Store 파일 생성 막기  (0) 2022.05.28
mac 창 분할 사용하기  (0) 2022.05.01
Posted by 구차니

drm 에서 HDMI hotplug를 아래 코드에서 처리하는데 shell로 어떻게 넘겨주는진 발견하지 못했다.

static int
udev_drm_event(int fd, uint32_t mask, void *data)
{
struct drm_backend *b = data;
struct udev_device *event;
uint32_t conn_id, prop_id;

event = udev_monitor_receive_device(b->udev_monitor);

if (udev_event_is_hotplug(b, event)) {
if (udev_event_is_conn_prop_change(b, event, &conn_id, &prop_id))
drm_backend_update_conn_props(b, conn_id, prop_id);
else
drm_backend_update_heads(b, event);
}

udev_device_unref(event);

return 1;
}

static void
drm_backend_update_heads(struct drm_backend *b, struct udev_device *drm_device)
{
/* collect new connectors that have appeared, e.g. MST */
for (i = 0; i < resources->count_connectors; i++) {
uint32_t connector_id = resources->connectors[i];

head = drm_head_find_by_connector(b, connector_id);
if (head) {
drm_head_update_info(head);
} else {
head = drm_head_create(b, connector_id, drm_device);
if (!head)
weston_log("DRM: failed to create head for hot-added connector %d.\n",
   connector_id);
}
}
}

static void
drm_head_update_info(struct drm_head *head)
{
drmModeConnector *connector;

connector = drmModeGetConnector(head->backend->drm.fd,
head->connector_id);
if (!connector) {
weston_log("DRM: getting connector info for '%s' failed.\n",
   head->base.name);
return;
}

if (drm_head_assign_connector_info(head, connector) < 0)
drmModeFreeConnector(connector);

if (head->base.device_changed)
drm_head_log_info(head, "updated");
}

static void
drm_head_log_info(struct drm_head *head, const char *msg)
{
if (head->base.connected) {
weston_log("DRM: head '%s' %s, connector %d is connected, "
   "EDID make '%s', model '%s', serial '%s'\n",
   head->base.name, msg, head->connector_id,
   head->base.make, head->base.model,
   head->base.serial_number ?: "");
} else {
weston_log("DRM: head '%s' %s, connector %d is disconnected.\n",
   head->base.name, msg, head->connector_id);
}
}

 

다만.. 아래의 코드에서 등록되어 output이 파괴될때 트리거 되어 작동하는 녀석만 발견함.

static void
handle_output_destroy(struct wl_listener *listener, void *data);

static void
create_shell_output(struct desktop_shell *shell,
struct weston_output *output)
{
struct shell_output *shell_output;

shell_output = zalloc(sizeof *shell_output);
if (shell_output == NULL)
return;

shell_output->output = output;
shell_output->shell = shell;
shell_output->destroy_listener.notify = handle_output_destroy;
wl_signal_add(&output->destroy_signal,
      &shell_output->destroy_listener);
wl_list_insert(shell->output_list.prev, &shell_output->link);

if (wl_list_length(&shell->output_list) == 1)
shell_for_each_layer(shell,
     shell_output_changed_move_layer, NULL);
}

static void
handle_output_create(struct wl_listener *listener, void *data)
{
struct desktop_shell *shell =
container_of(listener, struct desktop_shell, output_create_listener);
struct weston_output *output = (struct weston_output *)data;

create_shell_output(shell, output);
}


static void
setup_output_destroy_handler(struct weston_compositor *ec,
struct desktop_shell *shell)
{
struct weston_output *output;

wl_list_init(&shell->output_list);
wl_list_for_each(output, &ec->output_list, link)
create_shell_output(shell, output);

shell->output_create_listener.notify = handle_output_create;
wl_signal_add(&ec->output_created_signal,
&shell->output_create_listener);

shell->output_move_listener.notify = handle_output_move;
wl_signal_add(&ec->output_moved_signal, &shell->output_move_listener);
}

WL_EXPORT int
wet_shell_init(struct weston_compositor *ec,
       int *argc, char *argv[])
{
setup_output_destroy_handler(ec, shell);
}

'프로그램 사용 > wayland' 카테고리의 다른 글

libwayland debug 메시지  (0) 2022.06.27
libwayland  (0) 2022.06.27
weston debug message  (0) 2022.03.18
weston drm atomic  (0) 2022.03.17
wayvnc 실행 실패  (0) 2022.02.17
Posted by 구차니